diff options
author | gallatin <gallatin@FreeBSD.org> | 2002-07-03 02:55:48 +0000 |
---|---|---|
committer | gallatin <gallatin@FreeBSD.org> | 2002-07-03 02:55:48 +0000 |
commit | 0a24d4225f9df2e2472bb3e8d8e470f2ab153fa6 (patch) | |
tree | 53da20642f7c9c5e2958cbdb5f051c1cac591047 /sys/kern | |
parent | 9f5a919b22e40d0f0ee15fe90cf7a432bdf24448 (diff) | |
download | FreeBSD-src-0a24d4225f9df2e2472bb3e8d8e470f2ab153fa6.zip FreeBSD-src-0a24d4225f9df2e2472bb3e8d8e470f2ab153fa6.tar.gz |
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
Diffstat (limited to 'sys/kern')
-rw-r--r-- | sys/kern/kern_sig.c | 5 |
1 files changed, 4 insertions, 1 deletions
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; |