summaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorZhiqiang Liu <liuzhiqiang26@huawei.com>2020-03-30 10:44:43 +0800
committerChristian Brauner <christian.brauner@ubuntu.com>2020-04-12 22:46:34 +0200
commit3075afdf15b89a063f8d31c0db08a50472bb7faf (patch)
treedeee92300400ef8667cb0325725f23bcc1a06a33 /kernel
parenteaec2b0bd30690575c581eebffae64bfb7f684ac (diff)
downloadlinux-3075afdf15b89a063f8d31c0db08a50472bb7faf.tar.bz2
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: Zhiqiang Liu <liuzhiqiang26@huawei.com> Acked-by: Oleg Nesterov <oleg@redhat.com> Acked-by: Christian Brauner <christian.brauner@ubuntu.com> Link: https://lore.kernel.org/r/80236965-f0b5-c888-95ff-855bdec75bb3@huawei.com Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
Diffstat (limited to 'kernel')
-rw-r--r--kernel/signal.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/kernel/signal.c b/kernel/signal.c
index 3f94894d1253..713104884414 100644
--- a/kernel/signal.c
+++ b/kernel/signal.c
@@ -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)