summaryrefslogtreecommitdiffstats
path: root/sys/kern/kern_exit.c
diff options
context:
space:
mode:
authortanimura <tanimura@FreeBSD.org>2002-05-03 05:32:25 +0000
committertanimura <tanimura@FreeBSD.org>2002-05-03 05:32:25 +0000
commit58f1f5c532ae9a81c60b6a1a7e54ad895e064a72 (patch)
tree5b920d700adbb2e0fafe50281dbb6710febcf995 /sys/kern/kern_exit.c
parent20d0f94ddc7dea6947e89c901881ab755ae32d34 (diff)
downloadFreeBSD-src-58f1f5c532ae9a81c60b6a1a7e54ad895e064a72.zip
FreeBSD-src-58f1f5c532ae9a81c60b6a1a7e54ad895e064a72.tar.gz
Fix the lock order reversal between the sigio lock and a process/pgrp lock in
funsetownlst() by locking the sigio lock across funsetownlst().
Diffstat (limited to 'sys/kern/kern_exit.c')
-rw-r--r--sys/kern/kern_exit.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/kern/kern_exit.c b/sys/kern/kern_exit.c
index 2927647..ed6b6f0 100644
--- a/sys/kern/kern_exit.c
+++ b/sys/kern/kern_exit.c
@@ -191,9 +191,11 @@ exit1(td, rv)
* Reset any sigio structures pointing to us as a result of
* F_SETOWN with our pid.
*/
+ SIGIO_LOCK();
PROC_LOCK(p);
funsetownlst(&p->p_sigiolst);
PROC_UNLOCK(p);
+ SIGIO_UNLOCK();
/*
* Close open files and release open-file table.
OpenPOWER on IntegriCloud