NetBSD/sys/fs
hannken 2b6ec89863 The current implementation of vn_lock() is racy. Modification of
the vnode operations 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).

- 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.

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.

Adresses PR kern/37706 (Forced unmount of file systems is unsafe)

Discussed on tech-kern.

Welcome to 6.99.33
2014-02-27 16:51:37 +00:00
..
adosfs The current implementation of vn_lock() is racy. Modification of 2014-02-27 16:51:37 +00:00
cd9660 The current implementation of vn_lock() is racy. Modification of 2014-02-27 16:51:37 +00:00
efs The current implementation of vn_lock() is racy. Modification of 2014-02-27 16:51:37 +00:00
filecorefs The current implementation of vn_lock() is racy. Modification of 2014-02-27 16:51:37 +00:00
hfs The current implementation of vn_lock() is racy. Modification of 2014-02-27 16:51:37 +00:00
msdosfs Ensure that the top level sysctl nodes (kern, vfs, net, ...) exist before 2014-02-25 18:30:08 +00:00
nfs Fix typo ("then" instead of "than") 2013-12-09 09:35:16 +00:00
nilfs Ensure that the top level sysctl nodes (kern, vfs, net, ...) exist before 2014-02-25 18:30:08 +00:00
ntfs Ensure that the top level sysctl nodes (kern, vfs, net, ...) exist before 2014-02-25 18:30:08 +00:00
ptyfs The current implementation of vn_lock() is racy. Modification of 2014-02-27 16:51:37 +00:00
puffs Change vnode operation lookup to return the resulting vnode *vpp unlocked. 2014-02-07 15:29:20 +00:00
smbfs Ensure that the top level sysctl nodes (kern, vfs, net, ...) exist before 2014-02-25 18:30:08 +00:00
sysvbfs Change vnode operation lookup to return the resulting vnode *vpp unlocked. 2014-02-07 15:29:20 +00:00
tmpfs The current implementation of vn_lock() is racy. Modification of 2014-02-27 16:51:37 +00:00
udf Ensure that the top level sysctl nodes (kern, vfs, net, ...) exist before 2014-02-25 18:30:08 +00:00
union The current implementation of vn_lock() is racy. Modification of 2014-02-27 16:51:37 +00:00
unionfs Ensure that the top level sysctl nodes (kern, vfs, net, ...) exist before 2014-02-25 18:30:08 +00:00
v7fs Change vnode operation lookup to return the resulting vnode *vpp unlocked. 2014-02-07 15:29:20 +00:00
Makefile 7th Edition(V7) File System support. and NetBSD symbolic-link, socket, FIFO extension. see newfs_v7fs(8). 2011-06-27 11:52:22 +00:00
unicode.h