]> git.baikalelectronics.ru Git - kernel.git/commit
ftrace: do_each_pid_task() needs rcu lock
authorOleg Nesterov <oleg@redhat.com>
Tue, 3 Feb 2009 19:39:04 +0000 (20:39 +0100)
committerIngo Molnar <mingo@elte.hu>
Tue, 3 Feb 2009 21:50:58 +0000 (22:50 +0100)
commit277f2bd565a83057b6f65080fce6667f5e69d7fd
treee13a9ef3602f945ae51b73b592c8ae4d29e67ca3
parentd70cd0d73359ce79c2a5b424a6199b95a32bfbea
ftrace: do_each_pid_task() needs rcu lock

"ftrace: use struct pid" commit 8e86c2ca459254f9dcc755bc3ab9b8e64c5619ce
converted ftrace_pid_trace to "struct pid*".

But we can't use do_each_pid_task() without rcu_read_lock() even if
we know the pid itself can't go away (it was pinned in ftrace_pid_write).
The exiting task can detach itself from this pid at any moment.

Signed-off-by: Oleg Nesterov <oleg@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
kernel/trace/ftrace.c