cluster-devel.redhat.com archive mirror
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: cluster-devel.redhat.com
Subject: [Cluster-devel] [gfs2:master 3/5] fs/gfs2/rgrp.c:1946 gfs2_inplace_reserve() warn: variable dereferenced before check 'ap' (see line 1938)
Date: Wed, 4 Dec 2013 15:59:57 +0300	[thread overview]
Message-ID: <20131204125957.GS5443@mwanda> (raw)
In-Reply-To: <1386155881.2711.2.camel@menhir>

On Wed, Dec 04, 2013 at 11:18:01AM +0000, Steven Whitehouse wrote:
> Hi,
> 
> On Tue, 2013-12-03 at 14:01 +0300, Dan Carpenter wrote:
> [snip]
> > > > 90306c41 Benjamin Marzinski 2012-05-29  1939  				}
> > > > 90306c41 Benjamin Marzinski 2012-05-29  1940  			}
> > > > 292c8c14 Abhijith Das       2007-11-29  1941  		}
> > > > 666d1d8a Bob Peterson       2012-06-13  1942  
> > > > c743ffd0 Steven Whitehouse  2012-08-25  1943  		/* Skip unuseable resource groups */
> > > > 2d7e8aac Bob Peterson       2013-11-25  1944  		if ((rs->rs_rbm.rgd->rd_flags & (GFS2_RGF_NOALLOC |
> > > > 2d7e8aac Bob Peterson       2013-11-25  1945  						 GFS2_RDF_ERROR)) ||
> > > > 2d7e8aac Bob Peterson       2013-11-25 @1946  		    (ap && (ap->target > rs->rs_rbm.rgd->rd_extfail_pt)))
> > >  ... and this looks ok to me.
> > > 
> > > Can you give some more detail as to whats wrong here?
> > 
> > The check that was introduced could be removed because this function is
> > always called with a valid "ap" and we dereferenced it already.
> > 
> > regards,
> > dan carpenter
> > 
> 
> Ah, now I see what it is referring to. How does the following look as a
> fix?
> 

Perfect.

regards,
dan carpenter



      reply	other threads:[~2013-12-04 12:59 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20131203101239.GM5443@mwanda>
     [not found] ` <1386067565.2705.4.camel@menhir>
     [not found]   ` <20131203110141.GO5443@mwanda>
2013-12-04 11:18     ` [Cluster-devel] [gfs2:master 3/5] fs/gfs2/rgrp.c:1946 gfs2_inplace_reserve() warn: variable dereferenced before check 'ap' (see line 1938) Steven Whitehouse
2013-12-04 12:59       ` Dan Carpenter [this message]

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=20131204125957.GS5443@mwanda \
    --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;
as well as URLs for NNTP newsgroup(s).