Clear TDF_SINTR in sleepq_resume_thread, also sleepq_catch_signal does

not need to clear it now, this should fix panic when msleep is recursivly
called. Patch is slightly adjusted after review.

Reviewed by: jhb
Tested by: Csaba Henk, csaba-ml at creo.hu
MFC after: 3 days
This commit is contained in:
David Xu 2006-04-13 23:29:25 +00:00
parent 3f4f4a1465
commit cfd6f8cd6c
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=157743

View File

@ -413,7 +413,6 @@ sleepq_catch_signals(void *wchan)
mtx_lock_spin(&sched_lock);
if (TD_ON_SLEEPQ(td))
sleepq_resume_thread(sq, td, -1);
td->td_flags &= ~TDF_SINTR;
return (ret);
}
@ -633,6 +632,7 @@ sleepq_resume_thread(struct sleepqueue *sq, struct thread *td, int pri)
td->td_wmesg = NULL;
td->td_wchan = NULL;
td->td_flags &= ~TDF_SINTR;
/*
* Note that thread td might not be sleeping if it is running