]> git.hungrycats.org Git - linux/commit
[PATCH] Fix /proc access to dead thread group list oops
authorIngo Molnar <mingo@elte.hu>
Wed, 3 Dec 2003 04:59:12 +0000 (20:59 -0800)
committerLinus Torvalds <torvalds@home.osdl.org>
Wed, 3 Dec 2003 04:59:12 +0000 (20:59 -0800)
commit2452eef0112aef133caeaebfaf34b34b9eebd572
treee81c7969d12531cadc51d976d5f4387cc5a01a23
parent4d878fe361eaca6f95fe09e20682a7d6e7e13d62
[PATCH] Fix /proc access to dead thread group list oops

The pid_alive() check within the loop is incorrect.  If we are within
the tasklist lock and the thread group leader is valid then the thread
chain will be fully intact.

Instead, the check should be _outside_ the loop, since if the group
leader no longer exists, the whole list is gone and we must not try
to access it.

Move the check around, and add comment.

Bug-hunting and fix by Srivatsa Vaddagiri
fs/proc/base.c