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
This commit is contained in:
Andrew Gallatin 2002-07-03 02:55:48 +00:00
parent b61860ad2d
commit 0ac3b6364f

View File

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