From: mathieu.desnoyers@efficios.com (Mathieu Desnoyers)
Subject: [lttng-dev] lttng lib: ring buffer
Date: Wed, 30 Nov 2011 08:07:57 -0500 [thread overview]
Message-ID: <20111130130757.GB24727@Krystal> (raw)
In-Reply-To: <20111130084448.GE6268@elgon.mountain>
Will remove the duplicated check (it's already checked within
lib_ring_buffer_mmap_buf), and push to gregkh in my next round, thanks!
Mathieu
* Dan Carpenter (dan.carpenter at oracle.com) wrote:
> Hello Mathieu Desnoyers,
>
> This is a semi-automatic email about new static checker warnings.
>
> The patch c844b2f5cfea: "lttng lib: ring buffer" from Nov 28, 2011,
> leads to the following Smatch complaint:
>
> drivers/staging/lttng/lib/ringbuffer/ring_buffer_mmap.c +33 lib_ring_buffer_fault()
> warn: variable dereferenced before check 'buf' (see line 26)
>
> drivers/staging/lttng/lib/ringbuffer/ring_buffer_mmap.c
> 25 struct lib_ring_buffer *buf = vma->vm_private_data;
> 26 struct channel *chan = buf->backend.chan;
> ^^^^^^^^^^^^^^^^^
> Dereference.
>
> 27 const struct lib_ring_buffer_config *config = chan->backend.config;
> 28 pgoff_t pgoff = vmf->pgoff;
> 29 struct page **page;
> 30 void **virt;
> 31 unsigned long offset, sb_bindex;
> 32
> 33 if (!buf)
> ^^^^
> Check.
>
> 34 return VM_FAULT_OOM;
> 35
>
> regards,
> dan carpenter
>
--
Mathieu Desnoyers
Operating System Efficiency R&D Consultant
EfficiOS Inc.
http://www.efficios.com
next prev parent reply other threads:[~2011-11-30 13:07 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-11-30 8:44 Dan Carpenter
2011-11-30 13:07 ` Mathieu Desnoyers [this message]
-- strict thread matches above, loose matches on Subject: below --
2011-11-30 8:45 Dan Carpenter
2011-11-30 13:16 ` Mathieu Desnoyers
2011-11-30 8:44 Dan Carpenter
2011-11-30 13:03 ` Mathieu Desnoyers
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20111130130757.GB24727@Krystal \
--to=mathieu.desnoyers@efficios.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox