signal: check sig before setting info in kill_pid_usb_asyncio
PATCH 1/1 signal: check sig before setting info in kill_pid_usb_asyncio
In kill_pid_usb_asyncio, if signal is not valid, we do not need to set info struct.
--- kernel/signal.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
kernel/signal.c +3 -3
@@ -1505,15 +1505,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) {
Signature · 1 line
2.19.1
Quoted 5 lines · Zhiqiang Liu
In
kill_pid_usb_asyncio, if signal is not valid, we do not need to set info struct.Signed-off-by Zhiqiang Liu <[email protected]>
I'd have done:
if (!valid_signal(sig))
return -EINVAL;
instead of setting ret to EINVAL above but that's mostly a matter of style.
Picking this up unless someone sees a problem with it.
Thank you!
Friendly ping...
Quoted 21 lines · Christian Brauner
Quoted 5 lines · Zhiqiang Liu
In
kill_pid_usb_asyncio, if signal is not valid, we do not need to set info struct.Signed-off-by Zhiqiang Liu <[email protected]>I'd have done:
if (!valid_signal(sig))
return -EINVAL;instead of setting ret to EINVAL above but that's mostly a matter of style.
Picking this up unless someone sees a problem with it.
Thank you!
.
Quoted 10 lines · Zhiqiang Liu
Friendly ping...
Quoted 7 lines · Christian Brauner
Quoted 5 lines · Zhiqiang Liu
In
kill_pid_usb_asyncio, if signal is not valid, we do not need to set info struct.Signed-off-by Zhiqiang Liu <[email protected]>
Quoted 15 lines
Quoted 6 lines
I'd have done:
if (!valid_signal(sig))
return -EINVAL;instead of setting ret to EINVAL above but that's mostly a matter of
style.
Quoted 8 lines
Picking this up unless someone sees a problem with it.
Thank you!
.
The patches are queued for after rc1. So around next week. They came too late to make it into the merge window.
Christian
Quoted 24 lines · Christian Brauner
Quoted 23 lines · Zhiqiang Liu
Friendly ping...
Quoted 5 lines · Christian Brauner
Quoted 4 lines · Zhiqiang Liu
In
kill_pid_usb_asyncio, if signal is not valid, we do not need to set info struct.Quoted 8 lines
Quoted 1 line
Signed-off-by Zhiqiang Liu <[email protected]>I'd have done:
if (!valid_signal(sig))
return -EINVAL;instead of setting ret to EINVAL above but that's mostly a matter of
style.
Quoted 6 lines
Picking this up unless someone sees a problem with it.
Thank you!
Quoted 8 lines
Quoted 2 lines
Quoted 2 lines
.
The patches are queued for after rc1. So around next week. They came too late to make it into the merge window.
Christian
That is ok, thanks.
Regards.
Zhiqiang Liu.
Quoted 2 lines
.
Christian Brauner
AppliedQuoted 6 lines · Zhiqiang Liu
In
kill_pid_usb_asyncio, if signal is not valid, we do not need to set info struct.Signed-off-by Zhiqiang Liu <[email protected]>
Applied, thanks!
Christian