From: dan.carpenter@oracle.com (Dan Carpenter)
Subject: [lttng-dev] lttng lib: ring buffer
Date: Wed, 30 Nov 2011 11:44:49 +0300 [thread overview]
Message-ID: <20111130084448.GE6268@elgon.mountain> (raw)
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
next reply other threads:[~2011-11-30 8:44 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-11-30 8:44 Dan Carpenter [this message]
2011-11-30 13:07 ` Mathieu Desnoyers
-- 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=20111130084448.GE6268@elgon.mountain \
--to=dan.carpenter@oracle.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