1
0
mirror of https://git.FreeBSD.org/src.git synced 2025-02-08 10:02:12 +00:00

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
This commit is contained in:
Colin Percival 2004-04-12 15:56:05 +00:00
parent e16552014d
commit 4a3b3dcb55
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=128159

View File

@ -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)