fbf03babff
* Process A is closing one file descriptor belonging to a device. In doing so, ffs_update() is called and starts writing a block synchronously. (Note: This leaves the vnode locked. It also has other instances -- stdin, et al -- of the same device open, so v_usecount is definitely non-zero.) * Process B does a revoke() on the device. The revoke() has to wait for the vnode to be unlocked because ffs_update() is still in progress. * Process C tries to open() the device. It wedges in checkalias() repeatedly calling vget() because it returns EBUSY immediately. To fix, this: * checkalias() now uses LK_SLEEPFAIL rather than LK_NOWAIT. Therefore it will wait for the vnode to become unlocked, but it will recheck that it is on the hash list, in case it was in the process of being revoke()d or was revoke()d again before we were woken up. * Since we're relying on the vnode lock to tell us that the vnode hasn't been removed from the hash list *anyway*, I have moved the code to remove it into the DOCLOSE section of vclean(), inside the vnode lock. In the example at hand, process A was sh(1), process B was a child of init(8), and process C was syslogd(8). |
||
---|---|---|
bin | ||
contrib/sys | ||
crypto | ||
dist | ||
distrib | ||
doc | ||
etc | ||
games | ||
gnu | ||
include | ||
lib | ||
libexec | ||
regress | ||
rescue | ||
sbin | ||
share | ||
sys | ||
tools | ||
usr.bin | ||
usr.sbin | ||
x11 | ||
build.sh | ||
BUILDING | ||
Makefile | ||
Makefile.inc | ||
UPDATING |