summaryrefslogtreecommitdiffstats
path: root/kernel/signal.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/signal.c')
-rw-r--r--kernel/signal.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/kernel/signal.c b/kernel/signal.c
index 53228eb31..c313b0a11 100644
--- a/kernel/signal.c
+++ b/kernel/signal.c
@@ -438,8 +438,16 @@ kill_sl_info(int sig, struct siginfo *info, pid_t sess)
inline int
kill_proc_info(int sig, struct siginfo *info, pid_t pid)
{
- struct task_struct *p = find_task_by_pid(pid);
- return p ? send_sig_info(sig, info, p) : -ESRCH;
+ int error;
+ struct task_struct *p;
+
+ read_lock(&tasklist_lock);
+ p = find_task_by_pid(pid);
+ error = -ESRCH;
+ if (p)
+ error = send_sig_info(sig, info, p);
+ read_unlock(&tasklist_lock);
+ return error;
}
/*