freebsd-skq/sys/nfsserver
Konstantin Belousov 6179164448 In the nfsrv_fhtovp(), after the vfs_getvfs() function found the pointer
to the fs, but before a vnode on the fs is locked, unmount may free fs
structures, causing access to destroyed data and freed memory.

Introduce a vfs_busymp() function that looks up and busies found
fs while mountlist_mtx is held. Use it in nfsrv_fhtovp() and in the
implementation of the handle syscalls.

Two other uses of the vfs_getvfs() in the vfs_subr.c, namely in
sysctl_vfs_ctl and vfs_getnewfsid seems to be ok. In particular,
sysctl_vfs_ctl is protected by Giant by being a non-sleeping sysctl
handler, that prevents Giant-locked unmount code to interfere with it.

Noted by:	tegge
Reviewed by:	dfr
Tested by:	pho
MFC after:	1 month
2008-11-29 13:34:59 +00:00
..
nfs_fha.c Range-check NFSv2 procedure numbers before converting to NFSv3. 2008-11-07 10:43:01 +00:00
nfs_fha.h Implement support for RPCSEC_GSS authentication to both the NFS client 2008-11-03 10:38:00 +00:00
nfs_serv.c Implement support for RPCSEC_GSS authentication to both the NFS client 2008-11-03 10:38:00 +00:00
nfs_srvcache.c Implement support for RPCSEC_GSS authentication to both the NFS client 2008-11-03 10:38:00 +00:00
nfs_srvkrpc.c Use the remote address for access control, not the local address. This fixes 2008-11-13 14:36:52 +00:00
nfs_srvsock.c Implement support for RPCSEC_GSS authentication to both the NFS client 2008-11-03 10:38:00 +00:00
nfs_srvsubs.c In the nfsrv_fhtovp(), after the vfs_getvfs() function found the pointer 2008-11-29 13:34:59 +00:00
nfs_syscalls.c Implement support for RPCSEC_GSS authentication to both the NFS client 2008-11-03 10:38:00 +00:00
nfs.h Switch the default rpc implementation for NFS back to the new code. I believe 2008-11-14 11:27:53 +00:00
nfsm_subs.h Implement support for RPCSEC_GSS authentication to both the NFS client 2008-11-03 10:38:00 +00:00
nfsrvcache.h Implement support for RPCSEC_GSS authentication to both the NFS client 2008-11-03 10:38:00 +00:00
nfsrvstats.h