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] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 31 Mar 2010 11:30:22 -0700
From:	"Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>
To:	David Howells <dhowells@...hat.com>
Cc:	Eric Dumazet <eric.dumazet@...il.com>, Trond.Myklebust@...app.com,
	linux-nfs@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] NFS: Fix RCU warnings in
 nfs_inode_return_delegation_noreclaim() [ver #2]

On Wed, Mar 31, 2010 at 06:37:34PM +0100, David Howells wrote:
> Paul E. McKenney <paulmck@...ux.vnet.ibm.com> wrote:
> 
> > Protected by something that the caller did, be it holding the the correct
> > lock, operating on it during initialization before other CPUs have access
> > to it, operating on it during cleanup after other CPUs' access has been
> > revoked, or whatever.
> 
> But the point I made very early this morning still stands:  What if someone
> simply wants to test the pointer, not actually to dereference it?

OK, I was missing your point.  And this is what you were proposing
rcu_pointer_not_null() for.

> NFS was using rcu_dereference() for this in a couple of places - which is
> overkill.  I suggested stripping this off and you countered with the
> suggestion that it should be using rcu_dereference_check().
> 
> Why do I need anything at all?

Right now you don't.  We will need something as part of Arnd's patches to
shut sparse up, and I was hoping not to have to go through the find/fix
cycle twice.  But that turned out to be kind of pointless, since we
have burned far more time discussing than it would have taken to fix
it twice.  ;-)

But the discussion has been helpful, as I was previously just fine with
sprinkling otherwise-unneed rcu_dereference_whatever() calls thoughout
the kernel!

							Thanx, Paul
--
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