projects
/
platform
/
kernel
/
linux-rpi.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f887614
)
signal: check sig before setting info in kill_pid_usb_asyncio
author
Zhiqiang Liu
<liuzhiqiang26@huawei.com>
Mon, 30 Mar 2020 02:18:33 +0000
(10:18 +0800)
committer
Greg Kroah-Hartman
<gregkh@linuxfoundation.org>
Sat, 2 May 2020 06:48:55 +0000
(08:48 +0200)
[ Upstream commit
eaec2b0bd30690575c581eebffae64bfb7f684ac
]
In kill_pid_usb_asyncio, if signal is not valid, we do not need to
set info struct.
Signed-off-by: Zhiqiang Liu <liuzhiqiang26@huawei.com>
Acked-by: Christian Brauner <christian.brauner@ubuntu.com>
Link:
https://lore.kernel.org/r/f525fd08-1cf7-fb09-d20c-4359145eb940@huawei.com
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
kernel/signal.c
patch
|
blob
|
history
diff --git
a/kernel/signal.c
b/kernel/signal.c
index
2b9295f
..
595a36a
100644
(file)
--- a/
kernel/signal.c
+++ b/
kernel/signal.c
@@
-1510,15
+1510,15
@@
int kill_pid_usb_asyncio(int sig, int errno, sigval_t addr,
unsigned long flags;
int ret = -EINVAL;
+ if (!valid_signal(sig))
+ return ret;
+
clear_siginfo(&info);
info.si_signo = sig;
info.si_errno = errno;
info.si_code = SI_ASYNCIO;
*((sigval_t *)&info.si_pid) = addr;
- if (!valid_signal(sig))
- return ret;
-
rcu_read_lock();
p = pid_task(pid, PIDTYPE_PID);
if (!p) {