[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: CVS commit: src/sys/ufs/ufs
On Sun, Sep 20, 2009 at 08:23:38PM +0300, Antti Kantee wrote:
> > In ufs_ihashget(), vget() can return a vnode that has been vclean'ed because
> > vget() can sleep. After vget returns, check that vp is still connected with
> > ip, and that ip still points to the inode we want. This fix the NULL
> > pointer dereference in ufs_fhtovp() I've been seeing on a NFS server.
> Um, hold the phone. The whole point of vget() is to provide race-free
> access to the weak vnode reference held by the file system. Are you
> saying this does not hold anymore?
It depends on what you mean with "race-free". If you mean that the
vnode returned by vget() can't be recygled, I think this is true.
If you mean that vget() can't return a clean vnode then this is false:
vget() can sleep in vn_lock(), and it releases the v_interlock mutex before
sleeping. While sleeping vclean() can VOP_RECLAIM() the vnode, even
if v_usecount is > 1.
Manuel Bouyer <bouyer%antioche.eu.org@localhost>
NetBSD: 26 ans d'experience feront toujours la difference
Main Index |
Thread Index |