Date: Sat, 10 Apr 2004 13:14:14 +0100 From: Colin Percival <colin.percival@wadham.ox.ac.uk> To: Scott Sipe <cscotts@mindspring.com> Cc: freebsd-current@freebsd.org Subject: Re: sched lock/sleepq lock order reversal Message-ID: <6.0.1.1.1.20040410130044.03e2bdb8@imap.sfu.ca> In-Reply-To: <4077DB53.102@mindspring.com> References: <4077DB53.102@mindspring.com>
index | next in thread | previous in thread | raw e-mail
[-- Attachment #1 --] At 12:32 10/04/2004, Scott Sipe wrote: >I apologize in advance if this is a known ok LOR Looks new to me. Could you try the attached patch? Colin Percival [-- Attachment #2 --] Index: src/sys/kern/kern_sig.c =================================================================== RCS file: /home/ncvs/src/sys/kern/kern_sig.c,v retrieving revision 1.275 diff -u -r1.275 kern_sig.c --- src/sys/kern/kern_sig.c 5 Apr 2004 21:03:35 -0000 1.275 +++ src/sys/kern/kern_sig.c 10 Apr 2004 12:11:28 -0000 @@ -2020,8 +2020,8 @@ 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(); @@ -2217,7 +2217,7 @@ * 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. + * lock NOT held, since wakeup() picks up sched_lock as needed. */ static void stop(struct proc *p) [-- Attachment #3 --]help
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?6.0.1.1.1.20040410130044.03e2bdb8>
