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:	Tue, 16 Mar 2010 14:41:44 -0400
From:	Trond Myklebust <Trond.Myklebust@...app.com>
To:	David Howells <dhowells@...hat.com>
Cc:	paulmck@...ux.vnet.ibm.com, linux-nfs@...r.kernel.org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] NFS: Fix RCU warnings in
 nfs_inode_return_delegation_noreclaim()

On Tue, 2010-03-16 at 17:40 +0000, David Howells wrote: 
> Trond Myklebust <Trond.Myklebust@...app.com> wrote:
> 
> > > The lock is probably held here, in which case something like the
> > > following would work well without needing the artificial rcu_read_lock()
> > > and rcu_read_unlock():
> > 
> > No. The lock is not held here. At this point, the delegation has been
> > detached from the inode that pointed to it, and so we can free up its
> > contents.
> > 
> > We still need the call_rcu() to free up the allocated memory in order to
> > ensure that some process doing lockless traversal of the
> > clp->cl_delegations list doesn't crash.
> 
> In that case, surely you can't detach the credentials pointer until the
> callback is invoked?

We can, because the process that is traversing the list has to lock the
delegation and test whether it is still attached or not before it can
dereference and use the contents.

In fact, that credential pointer is only really meant to be used when we
need to return the delegation. Once we get to the nfs_free_delegation()
bit, it is no longer needed.

Cheers
  Trond
--
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