diff options
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/signal.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/kernel/signal.c b/kernel/signal.c index 228fdb5c01d1..de66def71644 100644 --- a/kernel/signal.c +++ b/kernel/signal.c | |||
@@ -1191,8 +1191,10 @@ EXPORT_SYMBOL_GPL(kill_pid_info_as_uid); | |||
1191 | 1191 | ||
1192 | static int kill_something_info(int sig, struct siginfo *info, int pid) | 1192 | static int kill_something_info(int sig, struct siginfo *info, int pid) |
1193 | { | 1193 | { |
1194 | int ret; | ||
1195 | rcu_read_lock(); | ||
1194 | if (!pid) { | 1196 | if (!pid) { |
1195 | return kill_pg_info(sig, info, process_group(current)); | 1197 | ret = kill_pgrp_info(sig, info, task_pgrp(current)); |
1196 | } else if (pid == -1) { | 1198 | } else if (pid == -1) { |
1197 | int retval = 0, count = 0; | 1199 | int retval = 0, count = 0; |
1198 | struct task_struct * p; | 1200 | struct task_struct * p; |
@@ -1207,12 +1209,14 @@ static int kill_something_info(int sig, struct siginfo *info, int pid) | |||
1207 | } | 1209 | } |
1208 | } | 1210 | } |
1209 | read_unlock(&tasklist_lock); | 1211 | read_unlock(&tasklist_lock); |
1210 | return count ? retval : -ESRCH; | 1212 | ret = count ? retval : -ESRCH; |
1211 | } else if (pid < 0) { | 1213 | } else if (pid < 0) { |
1212 | return kill_pg_info(sig, info, -pid); | 1214 | ret = kill_pgrp_info(sig, info, find_pid(-pid)); |
1213 | } else { | 1215 | } else { |
1214 | return kill_proc_info(sig, info, pid); | 1216 | ret = kill_pid_info(sig, info, find_pid(pid)); |
1215 | } | 1217 | } |
1218 | rcu_read_unlock(); | ||
1219 | return ret; | ||
1216 | } | 1220 | } |
1217 | 1221 | ||
1218 | /* | 1222 | /* |