Skip to contentSkip to conversation

signal: use kill_proc_info instead of kill_pid_info in kill_something_info

PATCH Applied Zhiqiang Liu 3 participants 6 messages Mar 30, 2020 – Apr 12, 2020

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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.

---
 kernel/signal.c | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)
kernel/signal.c +2 -6
index 9ad8dea93dbb..33c70f9f1728 100644
@@ -1552,12 +1552,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)
Signature · 1 line
2.19.1
Acked-by on v1 1/1
#1 lore raw
Quoted 4 lines · Zhiqiang Liu
kernel/signal.c +0 -0
@@ -1552,12 +1552,8 @@ static int kill_something_info(int sig, struct kernel_siginfo *info, pid_t pid)
 {
 	int ret;

kernel/signal.c static int kill_something_info(int sig, struct kernel_siginfo *info, pid_t pid) · line 1557

Quoted 10 lines
kernel/signal.c +2 -6
 
-	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);
 
#4 lore raw
Quoted 18 lines · Zhiqiang Liu

Friendly ping...

Quoted 3 lines · Christian Brauner
Quoted 2 lines · Zhiqiang Liu

signal.c provides kill_proc_info, we can use it instead of

kill_pid_info

Quoted 11 lines
Quoted 3 lines

in kill_something_info func gracefully.

Thanks! I'll shorten the commit message header a little when picking this up otherwise:

.

The patches are queued for after rc1. So around next week. They came too late to make it into the merge window.

Christian