aboutsummaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorEric W. Biederman <ebiederm@xmission.com>2007-02-12 03:52:55 -0500
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-02-12 12:48:31 -0500
commit8d42db189ca99703f0f4f91c477cb54808c8eaaa (patch)
tree9879222882a29c01dbff030c94ff8debbdcd1ddb /kernel
parent0e25338bc11fa8e41e44e4db5b5101e3d882dc5b (diff)
[PATCH] signal: rewrite kill_something_info so it uses newer helpers
The goal is to remove users of the old signal helper functions so they can be removed. Signed-off-by: Eric W. Biederman <ebiederm@xmission.com> Cc: Alan Cox <alan@lxorguk.ukuu.org.uk> Cc: Oleg Nesterov <oleg@tv-sign.ru> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'kernel')
-rw-r--r--kernel/signal.c12
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
1192static int kill_something_info(int sig, struct siginfo *info, int pid) 1192static 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/*