freebsd-skq/sys
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
..
amd64 - Add support for PMCs in Intel CPUs of Family 6, model 0xE (Core Solo 2008-11-27 09:00:47 +00:00
arm Convert BWCT and HL200 over to new board mechanism as well. The 2008-11-25 19:05:46 +00:00
boot Let ARM loader(8) build with the man page. 2008-11-27 16:53:01 +00:00
bsm Add support for extended header BSM tokens. Currently we use the 2008-11-11 21:57:03 +00:00
cam Retire the MALLOC and FREE macros. They are an abomination unto style(9). 2008-10-23 15:53:51 +00:00
cddl MFp4: Remove assertion that is no longer valid - we now use VOP_CLOSE() in 2008-11-29 12:32:42 +00:00
compat Document that all the other commands are either 2008-11-26 16:38:43 +00:00
conf Add a reference to hwpmc_core.c most likely missed in r185363 2008-11-28 12:23:02 +00:00
contrib Unhide declarations of network stack virtualization structs from 2008-11-28 23:30:51 +00:00
crypto Fix a potential NULL-pointer dereference in padlock(4). 2008-11-17 19:00:36 +00:00
ddb Collect N identical (or near identical) mkdumpheader() implementations into 2008-10-01 22:08:53 +00:00
dev Renamed the FRAMELEN macro to TRUEPHY_FRAMELEN as for powerpc 2008-11-28 23:44:13 +00:00
fs The timezone byte is a signed value, treat it as such. 2008-11-27 06:21:04 +00:00
gdb
geom Allow dumpon to a partition of type FS_UNUSED as well. 2008-11-26 05:18:27 +00:00
gnu Adapt to accmode_t changes. 2008-11-14 09:58:16 +00:00
i386 - Add support for PMCs in Intel CPUs of Family 6, model 0xE (Core Solo 2008-11-27 09:00:47 +00:00
ia64 Add sv_flags field to struct sysentvec with intention to provide description 2008-11-22 12:36:15 +00:00
isa Allow device hints to wire the unit numbers of devices. 2008-11-18 21:01:54 +00:00
kern In the nfsrv_fhtovp(), after the vfs_getvfs() function found the pointer 2008-11-29 13:34:59 +00:00
kgssapi Call svc_freereq() before returning from the service proc. 2008-11-12 15:31:05 +00:00
libkern Prefix the static shl function with '__' like its parent function __qdivrem to 2008-10-09 20:43:42 +00:00
mips Unbreak mips build by taking first WAG at mb(), wmb() and rmb(). The 2008-11-29 05:16:14 +00:00
modules make 'make universe' not complain about 2008-11-29 08:45:20 +00:00
net Unhide declarations of network stack virtualization structs from 2008-11-28 23:30:51 +00:00
net80211 correct sorting 2008-11-23 01:51:14 +00:00
netatalk Retire the MALLOC and FREE macros. They are an abomination unto style(9). 2008-10-23 15:53:51 +00:00
netgraph Unhide declarations of network stack virtualization structs from 2008-11-28 23:30:51 +00:00
netinet Add an essential .h file that skipped from the last commit (r185419). 2008-11-28 23:39:25 +00:00
netinet6 Unhide declarations of network stack virtualization structs from 2008-11-28 23:30:51 +00:00
netipsec Unhide declarations of network stack virtualization structs from 2008-11-28 23:30:51 +00:00
netipx Retire the MALLOC and FREE macros. They are an abomination unto style(9). 2008-10-23 15:53:51 +00:00
netnatm Retire the MALLOC and FREE macros. They are an abomination unto style(9). 2008-10-23 15:53:51 +00:00
netncp Retire the MALLOC and FREE macros. They are an abomination unto style(9). 2008-10-23 15:53:51 +00:00
netsmb Implement device cloning for /dev/nsmb, the netsmb control pseudo-device. 2008-11-03 14:23:15 +00:00
nfs
nfs4client Introduce accmode_t. This is required for NFSv4 ACLs - it will be neccessary 2008-10-28 13:44:11 +00:00
nfsclient Switch the default rpc implementation for NFS back to the new code. I believe 2008-11-14 11:27:53 +00:00
nfsserver In the nfsrv_fhtovp(), after the vfs_getvfs() function found the pointer 2008-11-29 13:34:59 +00:00
nlm Don't call svc_freereq() before svc_freeargs(). 2008-11-12 15:30:30 +00:00
opencrypto Don't hang if encrypting/decrypting using struct iovecs where one of the 2008-10-30 16:11:07 +00:00
pc98 Improved IDE HDD geometry adjustment. Previous code didn't work with 2008-10-27 08:40:13 +00:00
pccard
pci Move mn over. One of the last stragglers in sys/pci. There's no 2008-11-02 17:04:54 +00:00
powerpc Unbreak previous commit. 2008-11-22 22:15:34 +00:00
rpc Add a missing call to mtx_destroy(). 2008-11-12 12:21:18 +00:00
security Regularize /* FALLTHROUGH */ comments in the BSM event type switch, and 2008-11-25 11:25:45 +00:00
sparc64 Add sv_flags field to struct sysentvec with intention to provide description 2008-11-22 12:36:15 +00:00
sun4v - bump __FreeBSD version to reflect added buf_ring, memory barriers, 2008-11-22 05:55:56 +00:00
sys In the nfsrv_fhtovp(), after the vfs_getvfs() function found the pointer 2008-11-29 13:34:59 +00:00
tools Remove some unused and broken code that attempted to not invoke locking 2008-11-03 19:57:40 +00:00
ufs Busy ufs filesystem around block of code that does ".." lookup. Since 2008-11-22 13:11:11 +00:00
vm Instead of forcing vn_start_write() to reset mp back to NULL for the 2008-11-16 21:57:54 +00:00
xdr Use the remote address for access control, not the local address. This fixes 2008-11-13 14:36:52 +00:00
xen merge fix for boot-time hang on centos' xen 2008-11-14 07:06:27 +00:00
Makefile