lkml.org 
[lkml]   [2022]   [Jan]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Date
    Subject[PATCH 2/2] signal: Make coredump handling explicit in complete_signal

    Ever since commit 6cd8f0acae34 ("coredump: ensure that SIGKILL always
    kills the dumping thread") it has been possible for a SIGKILL received
    during a coredump to set SIGNAL_GROUP_EXIT and trigger a process
    shutdown (for a second time).

    Update the logic to explicitly allow coredumps so that coredumps can
    set SIGNAL_GROUP_EXIT and shutdown like an ordinary process.

    Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
    ---
    kernel/signal.c | 2 +-
    1 file changed, 1 insertion(+), 1 deletion(-)

    diff --git a/kernel/signal.c b/kernel/signal.c
    index f95a4423519d..0706c1345a71 100644
    --- a/kernel/signal.c
    +++ b/kernel/signal.c
    @@ -1032,7 +1032,7 @@ static void complete_signal(int sig, struct task_struct *p, enum pid_type type)
    * then start taking the whole group down immediately.
    */
    if (sig_fatal(p, sig) &&
    - !(signal->flags & SIGNAL_GROUP_EXIT) &&
    + (signal->core_state || !(signal->flags & SIGNAL_GROUP_EXIT)) &&
    !sigismember(&t->real_blocked, sig) &&
    (sig == SIGKILL || !p->ptrace)) {
    /*
    --
    2.29.2
    \
     
     \ /
      Last update: 2022-01-08 19:16    [W:3.714 / U:0.284 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site