HardenedBSD/sys
Justin T. Gibbs 5b326a32ce Prevent live-lock and access of destroyed data in taskqueue_drain_all().
Phabric:	https://reviews.freebsd.org/D1247
Reviewed by:	jhb, avg
Sponsored by:	Spectra Logic Corporation

sys/kern_subr_taskqueue.c:
	Modify taskqueue_drain_all() processing to use a temporary
	"barrier task", rather than rely on a user task that may
	be destroyed during taskqueue_drain_all()'s execution.  The
	barrier task is queued behind all previously queued tasks
	and then has its priority elevated so that future tasks
	cannot pass it in the queue.

	Use a similar barrier scheme to drain threads processing
	current tasks.  This requires taskqueue_run_locked() to
	insert and remove the taskqueue_busy object for the running
	thread for every task processed.

share/man/man9/taskqueue.9:
	Remove warning about live-lock issues with taskqueue_drain_all()
	and indicate that it does not wait for tasks queued after
	it begins processing.
2015-01-04 19:55:44 +00:00
..
amd64
arm
boot
bsm
cam
cddl
compat Regen for r276654 (__getcwd()). 2015-01-04 10:40:23 +00:00
conf Don't allow clang to use fpu instructions or registers in kernel modules. 2015-01-04 00:12:30 +00:00
contrib
crypto
ddb
dev
fs
gdb
geom
gnu
i386
isa
kern Prevent live-lock and access of destroyed data in taskqueue_drain_all(). 2015-01-04 19:55:44 +00:00
kgssapi
libkern
mips
modules
net
net80211
netgraph
netinet
netinet6
netipsec
netnatm
netpfil
netsmb
nfs
nfsclient
nfsserver
nlm
ofed
opencrypto
pc98
powerpc Truncate DB_SMALL_VALUE_MAX to a much lower value. 2015-01-04 01:45:26 +00:00
rpc
security
sparc64
sys Change the type of blksize_t from uint32_t to a POSIX compliant int32_t 2015-01-04 15:26:02 +00:00
teken
tools
ufs
vm
x86
xdr
xen
Makefile