Commit 3075afdf authored by Zhiqiang Liu's avatar Zhiqiang Liu Committed by Christian Brauner

signal: use kill_proc_info instead of kill_pid_info in kill_something_info

signal.c provides kill_proc_info, we can use it instead of kill_pid_info
in kill_something_info func gracefully.
Signed-off-by: default avatarZhiqiang Liu <liuzhiqiang26@huawei.com>
Acked-by: default avatarOleg Nesterov <oleg@redhat.com>
Acked-by: default avatarChristian Brauner <christian.brauner@ubuntu.com>
Link: https://lore.kernel.org/r/80236965-f0b5-c888-95ff-855bdec75bb3@huawei.comSigned-off-by: default avatarChristian Brauner <christian.brauner@ubuntu.com>
parent eaec2b0b
......@@ -1557,12 +1557,8 @@ static int kill_something_info(int sig, struct kernel_siginfo *info, pid_t pid)
{
int ret;
if (pid > 0) {
rcu_read_lock();
ret = kill_pid_info(sig, info, find_vpid(pid));
rcu_read_unlock();
return ret;
}
if (pid > 0)
return kill_proc_info(sig, info, pid);
/* -INT_MIN is undefined. Exclude this case to avoid a UBSAN warning */
if (pid == INT_MIN)
......
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