freebsd-skq/sys
Attilio Rao a50e80dcdd - Fix the kthread_{suspend, resume, suspend_check}() locking.
In the current code, the locking is completely broken and may lead
  easilly to deadlocks. Fix it by using the proc_mtx, linked to the
  suspending thread, as lock for the operation.  Keep using the
  thread_lock for setting and reading the flag even if it is not entirely
  necessary (atomic ops may do it as well, but this way the code is more
  readable).
- Fix a deadlock within kthread_suspend().
  The suspender should not sleep on a different channel wrt the suspended
  thread, or, otherwise, the awaker should wakeup both. Uniform the
  interface to what the kproc_* counterparts do (sleeping on the same
  channel).
- Change the kthread_suspend_check() prototype.
  kthread_suspend_check() always assumes curthread and must only refer to
  it, so skip the thread pointer as it may be easilly mistaken.
  If curthread is not a kthread, the system will panic.

In collabouration with:	jhb
Tested by:		Giovanni Trematerra
			<giovanni dot trematerra at gmail dot com>
MFC:			2 weeks
2010-01-24 15:07:00 +00:00
..
amd64 Fix array overflow. This routine is only called from procfs, 2010-01-24 12:13:38 +00:00
arm Move the examples for the 'hints' and 'env' keywords from various GENERIC 2010-01-19 17:20:34 +00:00
boot Add command-line option -dev to set the default value of the currdev 2010-01-18 06:48:24 +00:00
bsm Add audit events for process descriptor system calls, which will appear in 2009-09-29 21:25:59 +00:00
cam - Report SATA in legacy emulation mode still as SATA. 2010-01-10 09:20:56 +00:00
cddl Report ZFS filesystem version instead of the zpool version when we say it. 2010-01-11 23:15:11 +00:00
compat Let us to use our libusb(3) in Linuxolator. 2010-01-18 22:46:06 +00:00
conf - Move .text and all sections up to .bss inclusive to the beginning of 2010-01-23 05:59:10 +00:00
contrib Fix a new header inclusion. 2010-01-21 21:31:39 +00:00
crypto
ddb Replace several instances of 'if (!a & b)' with 'if (!(a &b))' in order 2010-01-08 15:44:49 +00:00
dev Add support for the NM10 chipset. 2010-01-24 10:50:20 +00:00
fs On LP64 struct ifid is 64-bit aligned while struct fid is 32-bit aligned 2010-01-23 22:38:01 +00:00
gdb
geom Expose stripe offset and stripe size through libgeom and geom(8) userland 2010-01-17 06:20:30 +00:00
gnu Bring in the ext2fs work done by Aditya Sarawgi during and after Google Summer 2010-01-14 14:30:54 +00:00
i386 Handle a race between pmap_kextract() and pmap_promote_pde(). This race is 2010-01-23 18:42:28 +00:00
ia64 Remove cpu_boot() and call efi_reset_system() directly from 2010-01-23 23:16:50 +00:00
isa Remove extraneous semicolons, no functional changes. 2010-01-07 21:01:37 +00:00
kern - Fix the kthread_{suspend, resume, suspend_check}() locking. 2010-01-24 15:07:00 +00:00
kgssapi
libkern Merge from head at r201628. 2010-01-06 05:58:07 +00:00
mips - Introduce kernel_kseg0_end variable that marks first address in KSEG0 2010-01-24 03:10:48 +00:00
modules Do not build netgraph kernel modules if WITHOUT_NETGRAPH is set in src.conf 2010-01-16 17:08:22 +00:00
net Do not hold the lock over if_setlladdr() as it calls into the interface driver 2010-01-19 04:29:42 +00:00
net80211 Use the iflladdr_event event to keep the mac address on the vap in sync with 2010-01-19 05:00:57 +00:00
netatalk Reverse misordered unlock and lock in at_control for netatalk phase I 2009-08-12 10:44:13 +00:00
netgraph Declare a new EVENTHANDLER called iflladdr_event which signals that the L2 2010-01-18 20:34:00 +00:00
netinet Use [] instead of [0] for flexible arrays. 2010-01-22 07:53:41 +00:00
netinet6 Correct a typo. 2010-01-24 10:22:39 +00:00
netipsec Enable IPcomp by default. 2009-11-29 20:47:43 +00:00
netipx Use queue(9) instead of hand-crafted link lists for the global IPX 2009-06-24 20:57:50 +00:00
netnatm
netncp
netsmb Don't print out a message on loading a module. 'kldload -v' and 'kldstat 2009-09-10 18:33:08 +00:00
nfs Revert rev 192323 (nfs_common.c only): 2009-07-12 03:53:52 +00:00
nfsclient Fix a typo in a comment introduced by r202767. 2010-01-21 21:59:10 +00:00
nfsserver Some style(9) fixes in order to fabricate a commit to denote that 2010-01-09 15:59:15 +00:00
nlm Handle GRANTED_RES messages more gracefully: Send along a grant cookie 2009-10-07 19:50:14 +00:00
opencrypto Add comments trying to explain what bad things happen here, i.e. 2010-01-09 15:43:47 +00:00
pc98 Move the examples for the 'hints' and 'env' keywords from various GENERIC 2010-01-19 17:20:34 +00:00
pci Add support for four more nfsmb controllers, shipping on at least the 2010-01-24 14:57:54 +00:00
powerpc Move the examples for the 'hints' and 'env' keywords from various GENERIC 2010-01-19 17:20:34 +00:00
rpc Replace the static NGROUPS=NGROUPS_MAX+1=1024 with a dynamic 2010-01-12 07:49:34 +00:00
security Replace the static NGROUPS=NGROUPS_MAX+1=1024 with a dynamic 2010-01-12 07:49:34 +00:00
sparc64 Merge r202882 from amd64/i386: 2010-01-23 22:11:18 +00:00
sun4v Add INCLUDE_CONFIG_FILE in GENERIC on all non-embedded platforms. 2010-01-10 17:44:22 +00:00
sys - Fix the kthread_{suspend, resume, suspend_check}() locking. 2010-01-24 15:07:00 +00:00
teken MFC @199204 2009-11-12 00:36:22 +00:00
tools Output a comment on top of each generated file explaining where it came 2009-10-25 09:48:21 +00:00
ufs Cast 64-bit quantity to intptr_t rather than int so as to work properly 2010-01-11 22:42:06 +00:00
vm When a vnode-backed vm object is referenced, it increments the vnode 2010-01-17 21:26:14 +00:00
xdr Add a check for a NULL mbuf ptr at the beginning of xdrmbuf_inline() 2009-08-12 16:27:51 +00:00
xen Remove extraneous semicolons, no functional changes. 2010-01-07 21:01:37 +00:00
Makefile