[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>
This commit is contained in:
parent
0e25338bc1
commit
8d42db189c
1 changed files with 8 additions and 4 deletions
|
@ -1191,8 +1191,10 @@ EXPORT_SYMBOL_GPL(kill_pid_info_as_uid);
|
||||||
|
|
||||||
static int kill_something_info(int sig, struct siginfo *info, int pid)
|
static int kill_something_info(int sig, struct siginfo *info, int pid)
|
||||||
{
|
{
|
||||||
|
int ret;
|
||||||
|
rcu_read_lock();
|
||||||
if (!pid) {
|
if (!pid) {
|
||||||
return kill_pg_info(sig, info, process_group(current));
|
ret = kill_pgrp_info(sig, info, task_pgrp(current));
|
||||||
} else if (pid == -1) {
|
} else if (pid == -1) {
|
||||||
int retval = 0, count = 0;
|
int retval = 0, count = 0;
|
||||||
struct task_struct * p;
|
struct task_struct * p;
|
||||||
|
@ -1207,12 +1209,14 @@ static int kill_something_info(int sig, struct siginfo *info, int pid)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
read_unlock(&tasklist_lock);
|
read_unlock(&tasklist_lock);
|
||||||
return count ? retval : -ESRCH;
|
ret = count ? retval : -ESRCH;
|
||||||
} else if (pid < 0) {
|
} else if (pid < 0) {
|
||||||
return kill_pg_info(sig, info, -pid);
|
ret = kill_pgrp_info(sig, info, find_pid(-pid));
|
||||||
} else {
|
} else {
|
||||||
return kill_proc_info(sig, info, pid);
|
ret = kill_pid_info(sig, info, find_pid(pid));
|
||||||
}
|
}
|
||||||
|
rcu_read_unlock();
|
||||||
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
Loading…
Reference in a new issue