freebsd-nq/sys
Don Lewis 12d360453c Close a race in the ufs_lookup() code that handles the ISDOTDOT
case by saving the value of dp->i_ino before unlocking the vnode
for the current directory and passing the saved value to VFS_VGET().

Without this change, another thread can overwrite dp->i_ino after
the current directory is unlocked, causing  ufs_lookup() to lock
and return the wrong vnode in place of the vnode for its parent
directory.  A deadlock can occur if dp->i_ino was changed to a
subdirectory of the current directory because the root to leaf vnode
lock ordering will be violated.  A vnode lock can be leaked if
dp->i_ino was changed to point to the current directory, which
causes the current vnode lock for the current directory to be
recursed, which confuses lookup() into calling vrele() when it
should be calling vput().

The probability of this bug being triggered seems to be quite low
unless the sysctl variable debug.vfscache is set to 0.

Reviewed by:	jhb
MFC after:	2 weeks
2005-10-14 22:13:33 +00:00
..
alpha 1. Change prototype of trapsignal and sendsig to use ksiginfo_t *, most 2005-10-14 12:43:47 +00:00
amd64 The signal code is now an int rather than a long, so update debug printfs. 2005-10-14 20:22:57 +00:00
arm Whitespace. 2005-10-14 18:36:49 +00:00
boot MFi386: revision 1.33. 2005-09-30 13:24:14 +00:00
bsm
cam Make the exploring of all luns supported by an HBA more of a 2005-09-16 01:26:17 +00:00
coda
compat 1. Change prototype of trapsignal and sendsig to use ksiginfo_t *, most 2005-10-14 12:43:47 +00:00
conf Remove the sx(4) driver at the request of the author. The author 2005-10-14 18:24:58 +00:00
contrib In detach method, move if_free() after bus_teardown_intr(). 2005-10-13 21:11:20 +00:00
crypto
ddb - Call db_setup_paging() for traceall. 2005-10-02 22:57:31 +00:00
dev Only allow the sk(4) driver to attach to revision 2 of the LinkSys EG1032 2005-10-14 18:51:30 +00:00
doc
fs 1. Change prototype of trapsignal and sendsig to use ksiginfo_t *, most 2005-10-14 12:43:47 +00:00
gdb
geom Rough implementation of the create and add verbs. The verbs cause 2005-10-09 17:10:35 +00:00
gnu Back out alpha/alpha/trap.c:1.124, osf1_ioctl.c:1.14, osf1_misc.c:1.57, 2005-09-28 07:03:03 +00:00
i4b
i386 The signal code is now an int rather than a long, so update debug printfs. 2005-10-14 20:22:57 +00:00
ia64 1. Change prototype of trapsignal and sendsig to use ksiginfo_t *, most 2005-10-14 12:43:47 +00:00
isa Fix an endianness issue in pnp_eisaformat(). This corrects printing PnP IDs 2005-09-28 15:01:58 +00:00
isofs/cd9660
kern Partially revert revision 1.66, which contained a change that did not 2005-10-14 19:15:10 +00:00
libkern Backout strtok() addition to libkern, strsep() is enough and strtok() 2005-10-06 19:06:07 +00:00
modules Sort SUBDIR and surrounding definitions. 2005-10-14 15:12:45 +00:00
net Make four more functions static that were missed in the last commit. 2005-10-14 20:57:02 +00:00
net80211 Properly set ic_curchan before calling back to device driver to do channel 2005-08-30 14:27:47 +00:00
netatalk Forward declare atalkdomain with static linkage, not extern, since 2005-09-11 16:04:56 +00:00
netatm
netgraph Further clean up the bridge hooks in if_ethersubr.c and ng_ether.c 2005-10-14 02:38:47 +00:00
netinet Change the reference counting to count the number of cloned interfaces for each 2005-10-12 19:52:16 +00:00
netinet6 AES counter mode uses 8byte IV, not 16 bytes. 2005-10-12 09:13:48 +00:00
netipsec Replace custom mbuf writeability test with generic M_WRITABLE() test 2005-09-26 20:35:45 +00:00
netipx Forward declaring static variables as extern is invalid ISO-C. Now that 2005-09-07 10:06:14 +00:00
netkey
netnatm Forward declaring static variables as extern is invalid ISO-C. Now that 2005-09-07 10:06:14 +00:00
netncp
netsmb Allow user to override default port numbers used by communication 2005-10-02 08:32:49 +00:00
nfs
nfs4client
nfsclient - Use strsep() instead of strtok(). 2005-10-06 19:04:08 +00:00
nfsserver Use the refcount API to manage the reference count for user credentials 2005-09-27 18:09:42 +00:00
opencrypto
pc98 Merge over the remaining changes from i386 of the ksiginfo_t changes so 2005-10-14 22:03:39 +00:00
pccard Remove the kernel portion of OLDCARD. I'm working on a replacement 2005-09-25 21:29:32 +00:00
pci Only allow the sk(4) driver to attach to revision 2 of the LinkSys EG1032 2005-10-14 18:51:30 +00:00
posix4
powerpc 1. Change prototype of trapsignal and sendsig to use ksiginfo_t *, most 2005-10-14 12:43:47 +00:00
rpc Add GIANT_REQUIRED and WITNESS sleep warnings to uprintf() and tprintf(), 2005-09-19 16:51:43 +00:00
security Lock object while we iterate through it's backing objects. 2005-10-09 02:37:27 +00:00
sparc64 Add a default value for VM_BCACHE_SIZE_MAX of 400MB. This is copied from 2005-10-14 20:31:12 +00:00
sys Regen for sigqueue syscall. 2005-10-14 12:56:28 +00:00
tools Add convenience macros for bus_space usage that doesn't require specification 2005-09-24 20:11:07 +00:00
ufs Close a race in the ufs_lookup() code that handles the ISDOTDOT 2005-10-14 22:13:33 +00:00
vm Move execve's access time update functionality into a new 2005-10-12 06:56:00 +00:00
Makefile