NetBSD/sys/nfs
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
..
files.nfs
krpc_subr.c
krpc.h
Makefile
nfs_bio.c Function nfs_vinvalbuf() ignores errors from vinvalbuf() and therefore 2013-08-12 17:46:38 +00:00
nfs_boot.c Mark a potentially unused variable 2013-10-25 20:46:29 +00:00
nfs_bootdhcp.c
nfs_bootparam.c tyop in comment, from Eivind Evensen via OpenBSD 2013-09-12 18:00:18 +00:00
nfs_bootstatic.c
nfs_clntsocket.c
nfs_clntsubs.c
nfs_export.c don't allow the nfs server module to unload if it has exported filesystems. 2013-12-14 16:19:28 +00:00
nfs_iod.c Mark a diagnostic-only variable 2013-10-25 16:01:56 +00:00
nfs_kq.c
nfs_node.c The current implementation of vn_lock() is racy. Modification of 2014-02-27 16:51:37 +00:00
nfs_serv.c Change vnode operations create, mknod, mkdir and symlink to return 2014-01-23 10:13:55 +00:00
nfs_socket.c Backout wildcard pragma to kill warnings and instead sprinkle a few dozen 2013-09-14 22:29:08 +00:00
nfs_srvcache.c
nfs_srvsocket.c
nfs_srvsubs.c Rename the new ni_startdir (the slot used to hold the starting point 2012-11-05 19:06:26 +00:00
nfs_subs.c knf (blank line even if there are no local declarations) 2013-09-18 23:27:38 +00:00
nfs_syscalls.c CID 271162: NULL deref check 2013-11-27 22:10:47 +00:00
nfs_var.h don't allow the nfs server module to unload if it has exported filesystems. 2013-12-14 16:19:28 +00:00
nfs_vfsops.c Ensure that the top level sysctl nodes (kern, vfs, net, ...) exist before 2014-02-25 18:30:08 +00:00
nfs_vnops.c Change vnode operation lookup to return the resulting vnode *vpp unlocked. 2014-02-07 15:29:20 +00:00
nfs.h Retire OSI network stack. OK core@ 2013-03-01 18:25:13 +00:00
nfsdiskless.h
nfsm_subs.h Backout wildcard pragma to kill warnings and instead sprinkle a few dozen 2013-09-14 22:29:08 +00:00
nfsmount.h
nfsnode.h
nfsproto.h
nfsrtt.h
nfsrvcache.h
rpcv2.h
xdr_subs.h