Commit 0c12b517 authored by Oleg Nesterov's avatar Oleg Nesterov Committed by Linus Torvalds

[PATCH] kill_pid_info: kill acquired_tasklist_lock

Kill acquired_tasklist_lock, sig_needs_tasklist() is very cheap nowadays.
Signed-off-by: default avatarOleg Nesterov <>
Cc: "Eric W. Biederman" <>
Signed-off-by: default avatarAndrew Morton <>
Signed-off-by: default avatarLinus Torvalds <>
parent b963a844
......@@ -1119,19 +1119,18 @@ kill_pg_info(int sig, struct siginfo *info, pid_t pgrp)
int kill_pid_info(int sig, struct siginfo *info, struct pid *pid)
int error;
int acquired_tasklist_lock = 0;
struct task_struct *p;
if (unlikely(sig_needs_tasklist(sig))) {
if (unlikely(sig_needs_tasklist(sig)))
acquired_tasklist_lock = 1;
p = pid_task(pid, PIDTYPE_PID);
error = -ESRCH;
if (p)
error = group_send_sig_info(sig, info, p);
if (unlikely(acquired_tasklist_lock))
if (unlikely(sig_needs_tasklist(sig)))
return error;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment