This is a note to let you know that I've just added the patch titled signal: check sig before setting info in kill_pid_usb_asyncio to the 5.6-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: signal-check-sig-before-setting-info-in-kill_pid_usb.patch and it can be found in the queue-5.6 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. commit 20e9e168a377b4129bc8f65bd91fd4cab481b107 Author: Zhiqiang Liu <liuzhiqiang26@xxxxxxxxxx> Date: Mon Mar 30 10:18:33 2020 +0800 signal: check sig before setting info in kill_pid_usb_asyncio [ 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@xxxxxxxxxx> Acked-by: Christian Brauner <christian.brauner@xxxxxxxxxx> Link: https://lore.kernel.org/r/f525fd08-1cf7-fb09-d20c-4359145eb940@xxxxxxxxxx Signed-off-by: Christian Brauner <christian.brauner@xxxxxxxxxx> Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx> diff --git a/kernel/signal.c b/kernel/signal.c index 7938c60e11dd2..9abf962bbde47 100644 --- 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) {