summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authorcperciva <cperciva@FreeBSD.org>2004-04-12 15:56:05 +0000
committercperciva <cperciva@FreeBSD.org>2004-04-12 15:56:05 +0000
commit7eb8531271fac4b9cdf820c038b73b1b85c0003b (patch)
tree87ba3da4a0a83408b465fe9b19e70c63b11d5016 /sys
parent4998d56908acfa474baafa8e5238f77cc0c6b0bf (diff)
downloadFreeBSD-src-7eb8531271fac4b9cdf820c038b73b1b85c0003b.zip
FreeBSD-src-7eb8531271fac4b9cdf820c038b73b1b85c0003b.tar.gz
stop() no longer needs sched_lock held; in fact, holding sched_lock causes
a LOR against sleepq. Fix the comment, and fix ptracestop() to pick up sched_lock after stop() rather than before. Reported by: Scott Sipe <cscotts@mindspring.com> Reviewed by: rwatson, jhb
Diffstat (limited to 'sys')
-rw-r--r--sys/kern/kern_sig.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/sys/kern/kern_sig.c b/sys/kern/kern_sig.c
index f0dd55d..71536a2 100644
--- a/sys/kern/kern_sig.c
+++ b/sys/kern/kern_sig.c
@@ -2020,8 +2020,8 @@ ptracestop(struct thread *td, int sig)
PROC_LOCK(p->p_pptr);
psignal(p->p_pptr, SIGCHLD);
PROC_UNLOCK(p->p_pptr);
+ stop(p);
mtx_lock_spin(&sched_lock);
- stop(p); /* uses schedlock too eventually */
thread_suspend_one(td);
PROC_UNLOCK(p);
DROP_GIANT();
@@ -2216,8 +2216,7 @@ issignal(td)
/*
* Put the argument process into the stopped state and notify the parent
* via wakeup. Signals are handled elsewhere. The process must not be
- * on the run queue. Must be called with the proc p locked and the scheduler
- * lock held.
+ * on the run queue. Must be called with the proc p locked.
*/
static void
stop(struct proc *p)
OpenPOWER on IntegriCloud