lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20100906053743.GD2463@linux.vnet.ibm.com>
Date:	Sun, 5 Sep 2010 22:37:43 -0700
From:	"Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>
To:	Neil Brown <neilb@...e.de>
Cc:	Stephen Rothwell <sfr@...b.auug.org.au>,
	linux-next@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: linux-next: build warning after merge of the rcu tree

On Mon, Sep 06, 2010 at 12:32:55PM +1000, Neil Brown wrote:
> On Mon, 6 Sep 2010 12:14:08 +1000
> Stephen Rothwell <sfr@...b.auug.org.au> wrote:
> 
> > Hi Paul,
> > 
> > After merging the rcu tree, today's linux-next build
> > (powerpc ppc64_defconfig) produced this warning:
> > 
> > drivers/md/raid1.c: In function 'read_balance':
> > drivers/md/raid1.c:445: warning: operation on 'new_disk' may be undefined
> > 
> > I am picking on the rcu tree because the line above has not changed since
> > 2005.  The line is:
> > 
> >                 for (rdev = rcu_dereference(conf->mirrors[new_disk].rdev);
> >                      r1_bio->bios[new_disk] == IO_BLOCKED ||
> >                      !rdev || !test_bit(In_sync, &rdev->flags)
> >                              || test_bit(WriteMostly, &rdev->flags);
> >                      rdev = rcu_dereference(conf->mirrors[++new_disk].rdev)) {
> > 
> > Where new_disk is being updated in the parameter to the last
> > rcu_dereference.
> > 
> 
> Hi Stephen,
> 
>  There is a patch in linux-kernel
>     "PATCH] md: do not use ++ in rcu_dereference() argument"
> 
>  that addresses this - it is a problem in md: I guess rcu as become more
>  helpful in finding these problems.

Indeed, the sparse-based checking is a bit more picky about things,
even when you are not using sparse...

							Thanx, Paul

>  I'll probably fix it a little differently, but I'll have something in my
>  for-next for tomorrow.
> 
> Thanks,
> NeilBrown
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ