Mirror of the lttng-dev mailing list
 help / color / mirror / Atom feed
From: mathieu.desnoyers@efficios.com (Mathieu Desnoyers)
Subject: [lttng-dev] lttng lib: ring buffer
Date: Wed, 30 Nov 2011 08:03:52 -0500	[thread overview]
Message-ID: <20111130130352.GA24727@Krystal> (raw)
In-Reply-To: <20111130084411.GD6268@elgon.mountain>

Fixed, I'll push the patch 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_frontend.c +1150 lib_ring_buffer_print_buffer_errors()
> 	 warn: variable dereferenced before check 'chan' (see line 1143)
> 
> drivers/staging/lttng/lib/ringbuffer/ring_buffer_frontend.c
>   1142	{
>   1143		const struct lib_ring_buffer_config *config = chan->backend.config;
>                                                               ^^^^^^^^^^^^^^^^^^^^
> Dereference.
> 
>   1144		unsigned long write_offset, cons_offset;
>   1145	
>   1146		/*
>   1147		 * Can be called in the error path of allocation when
>   1148		 * trans_channel_data is not yet set.
>   1149		 */
>   1150		if (!chan)
>                 ^^^^^^^^^
> Check.  At first glance the comment seems out of date, I think check can
> be removed safely.
> 
>   1151			return;
>   1152		/*
> 
> regards,
> dan carpenter
> 

-- 
Mathieu Desnoyers
Operating System Efficiency R&D Consultant
EfficiOS Inc.
http://www.efficios.com



  reply	other threads:[~2011-11-30 13:03 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:03 ` Mathieu Desnoyers [this message]
2011-11-30  8:44 Dan Carpenter
2011-11-30 13:07 ` Mathieu Desnoyers
2011-11-30  8:45 Dan Carpenter
2011-11-30 13:16 ` 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=20111130130352.GA24727@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