Go to file
mycroft fbf03babff There is an annoying deadlock that goes like this:
* 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).
2004-08-13 22:48:06 +00:00
bin If a files date is any time in the future (not six months or more), 2004-08-09 20:14:54 +00:00
contrib/sys Finalize import of the Atheros HAL 0.9.9.13, bringing ath(4) 2004-07-28 08:57:40 +00:00
crypto Disable the "may kill you" message, because: 2004-08-06 13:57:05 +00:00
dist revert the last all changes related to iconv(3). 2004-08-02 13:38:21 +00:00
distrib Move libg2c.so* (the g77 Fortran runtime) from comp to base. 2004-08-13 01:02:24 +00:00
doc file-4.10 is out. 2004-08-12 14:05:27 +00:00
etc Add an _rc_subr_loaded variable, set to ":" by rc.subr. Scripts can use this 2004-08-13 18:08:03 +00:00
games Grammar fix, from ray at raylai org via jmc@openbsd. 2004-06-01 10:10:06 +00:00
gnu Remove some unused variables. 2004-08-09 22:39:32 +00:00
include Delete prototypes for gethostent() and freehostent(); 2004-08-11 16:13:00 +00:00
lib Delete-previous-char and delete-next-char without an argument are not supposed 2004-08-13 12:10:38 +00:00
libexec Fixes from (or inspired by) OpenBSD: 2004-08-09 12:56:47 +00:00
regress support for bufferevents; fix signal race; faster timeout insertion; 2004-08-07 21:09:47 +00:00
rescue no need to list gnu/usr.bin any more. 2004-04-01 14:41:09 +00:00
sbin Put back one of the sleep()s -- it doesn't affect us in the usual case. 2004-08-13 17:22:39 +00:00
share Descend into man8.hp700. 2004-08-12 15:53:32 +00:00
sys There is an annoying deadlock that goes like this: 2004-08-13 22:48:06 +00:00
tools Build hp700's mkboot as a host tool called nbhp700-mkboot. mkboot also 2004-07-28 09:17:31 +00:00
usr.bin Save and restore screen underneath prompt boxes 2004-08-13 18:26:52 +00:00
usr.sbin Bump date for previous. 2004-08-13 13:45:53 +00:00
x11 Need to prefix relative directories with `${.CURDIR}/' so that 2004-08-05 01:28:47 +00:00
build.sh Add a change requested in PR#15548 and append the args passed to build.sh 2004-07-02 04:25:24 +00:00
BUILDING regen (Document -h. From Karsten Kruse in PR 25974. 2004-06-25 15:04:20 +00:00
Makefile The do-lib-libdes BUILDTARGET is unnecessary now we have the DEPLIBS 2004-07-30 07:05:11 +00:00
Makefile.inc don't set KERNSRCDIR here; pull in <bsd.kernobj.mk> if you need it 2002-04-10 14:53:43 +00:00
UPDATING Note the sendmail auto-start change, add a note about the ath 2004-07-22 03:55:33 +00:00