summaryrefslogtreecommitdiffstats
path: root/sys/kern/kern_kse.c
diff options
context:
space:
mode:
authordavidxu <davidxu@FreeBSD.org>2003-04-21 14:42:04 +0000
committerdavidxu <davidxu@FreeBSD.org>2003-04-21 14:42:04 +0000
commitd5ff3e991d4c478f58ae8e59672ac12af47d58ae (patch)
tree3883b3769c9c6154638adbf188670165e4bc9b34 /sys/kern/kern_kse.c
parent6d1b148a91ae695db0154d852b8e5fdf101578a3 (diff)
downloadFreeBSD-src-d5ff3e991d4c478f58ae8e59672ac12af47d58ae.zip
FreeBSD-src-d5ff3e991d4c478f58ae8e59672ac12af47d58ae.tar.gz
Fix lock order reversal problem.
Diffstat (limited to 'sys/kern/kern_kse.c')
-rw-r--r--sys/kern/kern_kse.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/sys/kern/kern_kse.c b/sys/kern/kern_kse.c
index 18c097f..6ccb19c 100644
--- a/sys/kern/kern_kse.c
+++ b/sys/kern/kern_kse.c
@@ -1867,13 +1867,12 @@ thread_single(int force_exit)
* In the mean time we suspend as well.
*/
thread_suspend_one(td);
- /* XXX If you recursed this is broken. */
- mtx_unlock(&Giant);
+ DROP_GIANT();
PROC_UNLOCK(p);
p->p_stats->p_ru.ru_nvcsw++;
mi_switch();
mtx_unlock_spin(&sched_lock);
- mtx_lock(&Giant);
+ PICKUP_GIANT();
PROC_LOCK(p);
}
if (force_exit == SINGLE_EXIT) {
OpenPOWER on IntegriCloud