Re: kernel BUG at kernel/exit.c:792!

From: Ingo Molnar
Date: Wed Dec 03 2003 - 15:04:12 EST

On Wed, 3 Dec 2003, Linus Torvalds wrote:

> I think the problem is the BUG() itself, not really the caller. So I'd
> prefer the fix for this to be to just entirely remove the debug tests
> withing that "#ifdef CONFIG_SMP", rather than hide the threads from
> /proc when this happens.
> Ingo, comments?

i'd like to keep the BUG() - it has caught this bug, and it has caught
other bugs too in the past. The next_thread() use of procfs is clearly
illegal if it happens after a thread has been removed from the tasklist.
procfs is really special in this regard (nothing else that accesses the
thread list is supposed to have a stale reference to the task).

removing the debug tests will cause further crashes i think - the thread
pointers are not valid anymore, they could point to truly freed tasks.
(this particular task is not freed yet because it has a procfs reference -
but the thread list pointers are not valid anymore.)

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at