]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commit
kernel/pid.c: update comment on find_task_by_pid_ns
authorTetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Fri, 5 Mar 2010 21:42:56 +0000 (13:42 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Sat, 6 Mar 2010 19:26:33 +0000 (11:26 -0800)
commit9728e5d6e6c432ee8487c63ce6e479e2474d9945
tree2cd7e9a9102649a36d52cbac918f045dcfaa08f2
parent8aeee85a29e27e043db582bf2ae8e5f42767934f
kernel/pid.c: update comment on find_task_by_pid_ns

tasklist_lock does protect the task and its pid, it can't go away.  The
problem is that find_pid_ns() itself is unsafe without rcu lock, it can
race with copy_process()->free_pid(any_pid).

Protecting copy_process()->free_pid(any_pid) with tasklist_lock would make
it possible to call find_task_by_pid_ns() under tasklist safely, but we
don't do so because we are trying to get rid of the read_lock sites of
tasklist_lock.

Signed-off-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Cc: Oleg Nesterov <oleg@redhat.com>
Cc: "Paul E. McKenney" <paulmck@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
kernel/pid.c