Re: RCU-isms in fs/nfs/delegation.c

From: Trond Myklebust
Date: Tue Apr 20 2010 - 08:29:31 EST


On Tue, 2010-04-20 at 09:48 +0100, David Howells wrote:
> Trond Myklebust <Trond.Myklebust@xxxxxxxxxx> wrote:
>
> > + nfs_inode_set_delegation(inode, cred, res);
> > + }
> > +out:
> > + rcu_read_unlock();
> > }
>
> I think this is wrong. nfs_inode_set_delegation() may sleep as it calls
> kmalloc() with GFP_KERNEL - but you still have the RCU read lock held. I
> think you need to drop the RCU read lock before calling it.
>
> David

Agreed. Thanks for the review...

Cheers
Trond
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/