Messages in this thread |  | | | From | "Manfred Spraul" <> | | Subject | Re: One more boobytrap needed for 2.2.15pre ? | | Date | Tue, 15 Feb 2000 19:31:00 +0100 |
| |
[cc'ed back to lk] I have one _idea_ what could have happened:
1) thread is running with TASK_INTERRUPTIBLE 2) calls schedule() 3) schedule calls del_from_runqueue() 4) ... 5) can't find a new task, jumps to recalculate 6) enables interrupts 7) interrupt 8) XXXXXXXXXXXXXX: someone changes current->state from within the interrupt. current->state now TASK_RUNNING 9) interrupt returns 10) recalculate finishes, jumps to repeat_schedule(). 11) prev->state == TASK_RUNNING, so current is selected 12) a task that's not on the runqueue is selected!!!!!!!!! Ok, but now the question is: which interrupt changes current->state? Perhaps a special boobytrap in the interrupt handlers could detect that?
in arch/i386/kernel/irq.c: * store "current->state" in a special local variable. * always change it to TASK_INTERRUPTIBLE. * before returning: check if someone changed current->state * restore the old value.
-- Manfred
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/
|  |