freebsd-dev/sys
Alfred Perlstein cc8317f2b0 Fix a deadlock in detach/shutdown.
The problem was that I was acquiring the driver sx lock and then waiting
for a taskqueue to drain, however the taskqueue itself would try to
acquire the lock as well leading to a deadlock.

To fix the problem roll my own exclusive lock that allows for lock
cancellation.  This is a normal exclusive lock, however if someone
marks it as "dead" then all waiters who request an error return will
get back an error instead of continuing to wait for the lock.

In this particular case, the shutdown and detach functions kill the
lock while the async task thread tries to acquire the lock but will
abort if the lock returns an error.

The other option was to drop the driver lock mid-detach and mid-shutdown,
mid-detach was a ok, however mid-shutdown was not.

While I'm here, fix a bug in what appears to be the mii link status
word in the softc going out to lunch.  Explicitly set the status
word to 1 after initializing the mii.  This would result in an interface
that would never respond to "if_start" requests as the mii interface
would always look down.
2006-12-23 17:18:18 +00:00
..
amd64 Fix a panic when rebooting a SMP machine, when option STOP_NMI is used, 2006-12-23 03:30:50 +00:00
arm Align the interfaces for the various watchdogs and make the interface 2006-12-15 21:44:49 +00:00
boot MFp4: differences for bwct ethernet attachment 2006-12-20 18:26:37 +00:00
bsm Merge OpenBSM 1.0 alpha 12 import changes into src/sys/bsm. New events 2006-09-25 12:22:07 +00:00
cam fix botch 2006-12-21 23:20:51 +00:00
coda change vop_lock handling to allowing tracking of callers' file and line for 2006-11-13 05:51:22 +00:00
compat MFP4 (110956): 2006-12-21 13:11:06 +00:00
conf Connect vfs_extattr.c to build by default. 2006-12-23 00:11:02 +00:00
contrib This commit was generated by cvs2svn to compensate for changes in r165182, 2006-12-13 19:26:37 +00:00
crypto Initialize T1 to silent gcc warning. 2006-10-22 02:19:33 +00:00
ddb Threading cleanup.. part 2 of several. 2006-12-06 06:34:57 +00:00
dev Fix a deadlock in detach/shutdown. 2006-12-23 17:18:18 +00:00
fs Unbreak 64-bit little-endian systems that do require alignment. 2006-12-21 05:40:46 +00:00
gdb Convert to new console api 2006-05-26 13:54:27 +00:00
geom Softc may be NULL in g_journal_orphan(), so don't be surprised. 2006-12-02 09:10:29 +00:00
gnu Previously, the mount_ext2fs binary listed the acceptable mount 2006-11-18 18:22:11 +00:00
i4b Sweep kernel replacing suser(9) calls with priv(9) calls, assigning 2006-11-06 13:42:10 +00:00
i386 Regen (just to fix 'generated from' line from the previous commit). 2006-12-20 20:42:58 +00:00
ia64 Add a lwpid field into per-cpu structure, the lwpid represents current 2006-12-20 04:40:39 +00:00
isa Optimized RTC accesses by avoiding null writes to the index register 2006-12-03 03:49:28 +00:00
isofs/cd9660 The ISO9660 spec does allow files up to 4G. Change the i_size 2006-12-08 07:43:53 +00:00
kern Update comments to reflect changes in the extattrctl() code. 2006-12-23 00:30:03 +00:00
libkern Add strstr() function to the libkern. 2006-08-12 15:28:39 +00:00
modules Allow this module to get its options from the kernel build directory 2006-12-21 21:35:49 +00:00
net MFp4: 92972, 98913 + one more change 2006-12-12 12:17:58 +00:00
net80211 Fix packing on the country band descriptor. No real change since this 2006-12-01 18:40:51 +00:00
netatalk Sweep kernel replacing suser(9) calls with priv(9) calls, assigning 2006-11-06 13:42:10 +00:00
netatm Sweep kernel replacing suser(9) calls with priv(9) calls, assigning 2006-11-06 13:42:10 +00:00
netgraph Return value PKT_ALIAS_FOUND_HEADER_FRAGMENT isn't an error case. The 2006-12-21 10:26:01 +00:00
netinet o made in kernel libalias mpsafe 2006-12-15 12:50:06 +00:00
netinet6 In ip6_sprintf print the addresses in a more common/readable 2006-12-16 14:15:31 +00:00
netipsec s,#if INET6,#ifdef INET6, 2006-12-14 17:33:46 +00:00
netipx Sweep kernel replacing suser(9) calls with priv(9) calls, assigning 2006-11-06 13:42:10 +00:00
netkey With exception of the if_name() macro, all definitions in net_osdep.h 2006-08-04 21:27:40 +00:00
netnatm Change semantics of socket close and detach. Add a new protocol switch 2006-07-21 17:11:15 +00:00
netncp Sweep kernel replacing suser(9) calls with priv(9) calls, assigning 2006-11-06 13:42:10 +00:00
netsmb Sweep kernel replacing suser(9) calls with priv(9) calls, assigning 2006-11-06 13:42:10 +00:00
nfs NFSv4 client: 2006-11-28 19:33:28 +00:00
nfs4client NFSv4 client: 2006-11-28 19:33:28 +00:00
nfsclient NetApp filers return corrupt post op attrs in the wcc on NFS error responses. 2006-12-11 19:54:25 +00:00
nfsserver MFp4: 92972, 98913 + one more change 2006-12-12 12:17:58 +00:00
opencrypto When DIAGNOSTIC is defined, verify if we don't free crypto requests from 2006-06-06 15:04:52 +00:00
pc98 Allow machdep.cpu_idle_hlt to be set from the loader. This should allow 2006-12-06 18:27:17 +00:00
pccard
pci Don't assume IF_LLADDR returns aligned memory address. 2006-12-18 01:38:10 +00:00
powerpc Remove bogus increment of re-hashed PTEG index. This snuck in with r1.12 of 2006-12-20 01:10:21 +00:00
rpc
security Move src/sys/sys/mac_policy.h, the kernel interface between the MAC 2006-12-22 23:34:47 +00:00
sparc64 add new large page sizes for use by shared loader 2006-12-18 07:28:59 +00:00
sun4v reduce padding to compensate for recent change to sys/pcpu.h (tinderbox fix) 2006-12-20 20:18:07 +00:00
sys Move src/sys/sys/mac_policy.h, the kernel interface between the MAC 2006-12-22 23:34:47 +00:00
tools Check for errors when registering and unregistering firmware modules. This 2006-06-16 21:06:03 +00:00
ufs change vop_lock handling to allowing tracking of callers' file and line for 2006-11-13 05:51:22 +00:00
vm Optimize vm_object_split(). Specifically, make the number of iterations 2006-12-17 20:14:43 +00:00
Makefile o Add cam to a list of cscope dirs. 2006-11-26 18:27:16 +00:00