Remove a bogus assertion and readd it in a more correct location. A thread
might be enqueued on a sleep queue but not be asleep when the timeout fires if it is blocked on a lock trying to check for pending signals before going to sleep. In the case of fixing up the TDF_TIMEOUT race, however, the thread must be marked asleep. Reported by: kan (the bogus one)
This commit is contained in:
parent
12b38947d4
commit
27de234992
@ -667,7 +667,6 @@ sleepq_timeout(void *arg)
|
||||
* synchronize with this function.
|
||||
*/
|
||||
if (TD_ON_SLEEPQ(td)) {
|
||||
MPASS(TD_IS_SLEEPING(td));
|
||||
MPASS(td->td_wchan == wchan);
|
||||
MPASS(sq != NULL);
|
||||
td->td_flags |= TDF_TIMEOUT;
|
||||
@ -688,6 +687,7 @@ sleepq_timeout(void *arg)
|
||||
* need to be canceled.
|
||||
*/
|
||||
if (td->td_flags & TDF_TIMEOUT) {
|
||||
MPASS(TD_IS_SLEEPING(td));
|
||||
td->td_flags &= ~TDF_TIMEOUT;
|
||||
TD_CLR_SLEEPING(td);
|
||||
setrunnable(td);
|
||||
|
Loading…
Reference in New Issue
Block a user