]> git.baikalelectronics.ru Git - kernel.git/commit
[PATCH] proc: drop tasklist lock in task_state()
authorOleg Nesterov <oleg@tv-sign.ru>
Mon, 2 Oct 2006 09:18:54 +0000 (02:18 -0700)
committerLinus Torvalds <torvalds@g5.osdl.org>
Mon, 2 Oct 2006 14:57:24 +0000 (07:57 -0700)
commit0a666047eb3c2392106e257b6eb88953d3068217
tree840fd70ce726f94ff389d97dd012e53ae02f1dcf
parent5d3e2c511f9c586afab17917aa7800756b5f9733
[PATCH] proc: drop tasklist lock in task_state()

task_state() needs tasklist_lock to protect ->parent/->real_parent.  However
task->parent points to nowhere only when the actions below happen in order

1) release_task(task)
2) release_task(task->parent)
3) a grace period passed

But 3) implies that the memory ops from 1) should be finished, so pid_alive()
can't be true in such a case.

Otherwise, we don't care if ->parent/->real_parent changes under us.

Signed-off-by: Oleg Nesterov <oleg@tv-sign.ru>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
fs/proc/array.c