diff options
author | Oleg Nesterov <oleg@tv-sign.ru> | 2008-04-30 07:52:45 (GMT) |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-04-30 15:29:34 (GMT) |
commit | 6ca25b551309eb1b1b41f83414a92f7472e0b23d (patch) | |
tree | a2c5785ec484ec997ac6a03d3fceae04e4d21795 /kernel/signal.c | |
parent | e442055193e4584218006e616c9bdce0c5e9ae5c (diff) | |
download | linux-fsl-qoriq-6ca25b551309eb1b1b41f83414a92f7472e0b23d.tar.xz |
kill_pid_info: don't take now unneeded tasklist_lock
Previously handle_stop_signal(SIGCONT) could drop ->siglock. That is why
kill_pid_info(SIGCONT) takes tasklist_lock to make sure the target task can't
go away after unlock. Not needed now.
Signed-off-by: Oleg Nesterov <oleg@tv-sign.ru>
Cc: Roland McGrath <roland@redhat.com>
Cc: Jiri Kosina <jkosina@suse.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'kernel/signal.c')
-rw-r--r-- | kernel/signal.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/kernel/signal.c b/kernel/signal.c index 115c04f..ce53ab1 100644 --- a/kernel/signal.c +++ b/kernel/signal.c @@ -1039,9 +1039,6 @@ int kill_pid_info(int sig, struct siginfo *info, struct pid *pid) struct task_struct *p; rcu_read_lock(); - if (unlikely(sig_needs_tasklist(sig))) - read_lock(&tasklist_lock); - retry: p = pid_task(pid, PIDTYPE_PID); if (p) { @@ -1055,10 +1052,8 @@ retry: */ goto retry; } - - if (unlikely(sig_needs_tasklist(sig))) - read_unlock(&tasklist_lock); rcu_read_unlock(); + return error; } |