mirror of
https://github.com/torvalds/linux.git
synced 2024-11-22 12:11:40 +00:00
signal: Initialize the info in ksignal
When handing the SIGNAL_GROUP_EXIT flag, the info in ksignal isn't cleared. However, the info acquired by dequeue_synchronous_signal/dequeue_signal is initialized and can be safely used. Fortunately, the fatal signal process just uses the si_signo and doesn't use any other member. Even so, the initialization before use is more safer. Signed-off-by: haifeng.xu <haifeng.xu@shopee.com> Signed-off-by: Kees Cook <keescook@chromium.org> Link: https://lore.kernel.org/r/20221128065606.19570-1-haifeng.xu@shopee.com
This commit is contained in:
parent
5abf698754
commit
3a017d6355
@ -2693,6 +2693,7 @@ relock:
|
||||
/* Has this task already been marked for death? */
|
||||
if ((signal->flags & SIGNAL_GROUP_EXIT) ||
|
||||
signal->group_exec_task) {
|
||||
clear_siginfo(&ksig->info);
|
||||
ksig->info.si_signo = signr = SIGKILL;
|
||||
sigdelset(¤t->pending.signal, SIGKILL);
|
||||
trace_signal_deliver(SIGKILL, SEND_SIG_NOINFO,
|
||||
|
Loading…
Reference in New Issue
Block a user