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

From: Ingo Molnar
Date: Wed Dec 03 2003 - 15:19:22 EST



On Wed, 3 Dec 2003, Linus Torvalds wrote:

> > only the starting point should be checked. If the starting point is wrong
> > then we have no access to the 'thread list' anymore. If the starting point
> > is alive then all the thread-list walking within the tasklist_lock is
> > safe.
>
> I'm not sure that's true. The starting point is not necessarily the
> thread group leader, and then following the chain can see a zombie
> thread group leader in the _middle_ without a sighandler pointer - at
> which point we BUG() out again.

hm, get_tid_list() is used in proc_task_readdir(), which is
/proc/<TGID>/task/ directory - so proc_task(dir) is a thread group leader
by definition, right?

also, a zombie thread group leader does not mean it's removed from the
thread list - we keep it around hashed just to enable the 'process' to
live along and only release it once the last thread has gone too (by
delaying parent notification up to the last thread has exited).

But this should be irrelevant in this case, i think the crash here is
stale access to the thread leader via /proc/<TGID>, and trying to follow
that non-existent thread list pointer.

Ingo
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/