Skip to content

Commit 3075afd

Browse files
ZhiqiangLiu26Christian Brauner
authored andcommitted
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 <[email protected]> Acked-by: Oleg Nesterov <[email protected]> Acked-by: Christian Brauner <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Christian Brauner <[email protected]>
1 parent eaec2b0 commit 3075afd

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

kernel/signal.c

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1557,12 +1557,8 @@ static int kill_something_info(int sig, struct kernel_siginfo *info, pid_t pid)
15571557
{
15581558
int ret;
15591559

1560-
if (pid > 0) {
1561-
rcu_read_lock();
1562-
ret = kill_pid_info(sig, info, find_vpid(pid));
1563-
rcu_read_unlock();
1564-
return ret;
1565-
}
1560+
if (pid > 0)
1561+
return kill_proc_info(sig, info, pid);
15661562

15671563
/* -INT_MIN is undefined. Exclude this case to avoid a UBSAN warning */
15681564
if (pid == INT_MIN)

0 commit comments

Comments
 (0)