On Fri, Feb 21, 2014 at 12:35:40PM +0100, J. Hannken-Illjes wrote: > The current implementation of vn_lock() is racy. Modification of > the vnode oprations vector for active vnodes is unsafe because it > is not known whether deadfs or the original file system will be > called. > > - Pass down LK_RETRY to the lock operation (hint for deadfs only). > > - Split deadfs lock operations from genfs_XXXlock and change > deadfs lock operation to return ENOENT if LK_RETRY is unset. > > - Change all other lock operations to check for dead vnode once > the vnode is locked and unlock and return ENOENT in this case. > > - Add flag LK_INTERLOCK (requiring LK_NOWAIT) to make it possible > for vrelel() to try a lock with v_interlock held. > > With these changes in place vnode lock operations will never succeed > after vclean() has marked the vnode as VI_XLOCK and before vclean() > has changed the operations vector. > > Diff available at http://www.netbsd.org/~hannken/vnode-pass3-1.diff > > Comments or objections anyone?
I wanted to understand what you're describing here, but I don't know what deadfs is, and "apropos deadfs" only pointed to hier(7). Could someone please describe it, at best in a manpage? (I'm happy to help with formatting.) Thomas
