From 0a24d4225f9df2e2472bb3e8d8e470f2ab153fa6 Mon Sep 17 00:00:00 2001 From: gallatin Date: Wed, 3 Jul 2002 02:55:48 +0000 Subject: Hold the sched lock across call to forward_signal() in tdsignal() to keep SMP systems from panic'ing when ^C'ing an app suggested by julian --- sys/kern/kern_sig.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'sys/kern/kern_sig.c') diff --git a/sys/kern/kern_sig.c b/sys/kern/kern_sig.c index e8ded21..8632f23 100644 --- a/sys/kern/kern_sig.c +++ b/sys/kern/kern_sig.c @@ -1543,8 +1543,11 @@ tdsignal(struct thread *td, int sig, sig_t action) td->td_state == TDS_RUNNING) { signotify(td->td_proc); #ifdef SMP - if (td->td_state == TDS_RUNNING && td != curthread) + if (td->td_state == TDS_RUNNING && td != curthread) { + mtx_lock_spin(&sched_lock); forward_signal(td); + mtx_unlock_spin(&sched_lock); + } #endif } goto out; -- cgit v1.1