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 <[email protected]>
Cc: Roland McGrath <[email protected]>
Cc: Jiri Kosina <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
Oleg Nesterov 2008-04-30 00:52:45 -07:00 • committed by Linus Torvalds
commit 6ca25b5513
2 changed files with 1 additions and 8 deletions

View file

@ -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;
}