freebsd-nq/sys
Alexander Kabaev c8b876219f Upgrading a lock does not play well together with acquiring an exclusive lock
and can lead to two threads being granted exclusive access. Check that no one
has the same lock in exclusive  mode before proceeding to acquire it.

The LK_WANT_EXCL and LK_WANT_UPGRADE bits act as mini-locks and can block
other threads.  Normally this is not a problem since the mini locks are
upgraded to full locks and the release of the locks will unblock the other
threads.  However if a thread reset the bits without obtaining a full lock
other threads are not awoken. Add missing wakeups for these cases.

PR:		kern/69964
Submitted by:	Stephan Uphoff <ups at tree dot com>
Very good catch by: Stephan Uphoff <ups at tree dot com>
2004-08-16 15:01:22 +00:00
..
alpha Add a new type, l_uintptr_t, which is an unsigned integer type with the 2004-08-16 07:05:44 +00:00
amd64 Complete 'IA32' -> 'COMPAT_IA32' change for the Linuxulator32. 2004-08-16 12:51:33 +00:00
arm Add __elfN(dump_thread). This function is called from __elfN(coredump) 2004-08-11 02:35:06 +00:00
boot Catch up with change to <machine/pte.h>. 2004-08-10 02:08:57 +00:00
cam Add locking to the kqueue subsystem. This also makes the kqueue subsystem 2004-08-15 06:24:42 +00:00
coda Put a version element in the VFS filesystem configuration structure 2004-07-30 22:08:52 +00:00
compat Fix the 'DEBUG' argument code to unbreak the amd64 LINT build. 2004-08-16 12:15:07 +00:00
conf Add MP_WATCHDOG option information to pc98, as it uses the i386 2004-08-16 13:59:01 +00:00
contrib Get rid of the RANDOM_IP_ID option and make it a sysctl. NetBSD 2004-08-14 15:32:40 +00:00
crypto Use __FBSDID(). 2004-06-14 00:38:54 +00:00
ddb Damage control. Correcly advance symtab and strtab pointers, not 2004-07-28 08:59:08 +00:00
dev AMD64 on-CPU GART support. 2004-08-16 12:25:48 +00:00
doc Experimental support for using doxygen to generate kernel documentation. 2004-07-11 16:13:57 +00:00
fs Release the vnode cache mutex when calling vgone(), since vgone() may 2004-08-15 21:58:02 +00:00
gdb Comment-out the debugging printf I left in in case there were some 2004-08-10 19:32:33 +00:00
geom Minor style.9 cleanup. 2004-08-16 10:33:35 +00:00
gnu Add locking to the kqueue subsystem. This also makes the kqueue subsystem 2004-08-15 06:24:42 +00:00
i4b Fix a possible hang which apparently occurs during a warm boot (cold boot 2004-07-18 20:13:31 +00:00
i386 AMD64 on-CPU GART support. 2004-08-16 12:25:48 +00:00
ia64 Allocate memory in the unwinder with M_NOWAIT. We may need to provide 2004-08-14 05:00:37 +00:00
isa Assume a finger of regular width when no width value is reported by 2004-08-08 01:26:00 +00:00
isofs/cd9660 Put a version element in the VFS filesystem configuration structure 2004-07-30 22:08:52 +00:00
kern Upgrading a lock does not play well together with acquiring an exclusive lock 2004-08-16 15:01:22 +00:00
libkern Convert the vfsconf list to a TAILQ. 2004-07-27 22:32:01 +00:00
modules AMD64 on-CPU GART support. 2004-08-16 12:25:48 +00:00
net Add locking to the kqueue subsystem. This also makes the kqueue subsystem 2004-08-15 06:24:42 +00:00
net80211 Add a new network interface flag, IFF_NEEDSGIANT, which will allow 2004-07-27 23:20:45 +00:00
netatalk Inline umich license from COPYRIGHT to make it clear what license the 2004-08-10 03:23:05 +00:00
netatm Avoid casts as lvalues. 2004-07-28 06:59:55 +00:00
netgraph This is the netgraph node framework for the user side call control 2004-08-12 14:22:00 +00:00
netinet Put the 'antispoof' opcode in the proper place in the opcode list such 2004-08-16 12:05:19 +00:00
netinet6 Get rid of the RANDOM_IP_ID option and make it a sysctl. NetBSD 2004-08-14 15:32:40 +00:00
netipsec Get rid of the RANDOM_IP_ID option and make it a sysctl. NetBSD 2004-08-14 15:32:40 +00:00
netipx Avoid casts as lvalues. Declare local variable as u_char * instead of 2004-07-28 06:58:23 +00:00
netkey Merge next step in socket buffer locking: 2004-06-21 00:20:43 +00:00
netnatm Constify send and receive space constants in natm. 2004-06-24 03:11:29 +00:00
netncp Do the dreaded s/dev_t/struct cdev */ 2004-06-16 09:47:26 +00:00
netsmb Avoid casts as lvalues. 2004-07-28 06:59:55 +00:00
nfs
nfs4client Put a version element in the VFS filesystem configuration structure 2004-07-30 22:08:52 +00:00
nfsclient Put a version element in the VFS filesystem configuration structure 2004-07-30 22:08:52 +00:00
nfsserver If debug.mpsafenet is non-zero, run the NFS server callout without 2004-07-24 02:32:27 +00:00
opencrypto Don't acquire Giant in cryptof_close(), as the code is intended to be 2004-08-10 03:26:17 +00:00
pc98 MFi386: revision 1.597. 2004-08-05 13:01:29 +00:00
pccard Move PNP IDs back into oldcard files 2004-08-13 06:57:31 +00:00
pci AMD64 on-CPU GART support. 2004-08-16 12:25:48 +00:00
posix4
powerpc Add /dev/mem and /dev/kmem to powerpc. 2004-08-16 13:07:40 +00:00
rpc fix array index out of bounds in rpc->rc_srtt[], rpc->rc_sdrtt[] 2004-07-15 22:21:25 +00:00
security * Add a "how" argument to uma_zone constructors and initialization functions 2004-08-02 00:18:36 +00:00
sparc64 Correct some uses of the wrong members of the *min()/*max()-familiy, e.g. 2004-08-15 21:37:52 +00:00
sys move the declaration of struct kqlist into the non-KERNEL visable section 2004-08-15 15:36:18 +00:00
tools Pass doxygen doc comments through to the output. 2004-07-11 16:14:24 +00:00
ufs When looking for some extra data to include in the hash, use the 2004-08-16 10:00:44 +00:00
vm - Introduce and use a new tunable "debug.mpsafevm". At present, setting 2004-08-16 06:16:12 +00:00
Makefile