lkml.org 
[lkml]   [2018]   [Apr]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    From
    Date
    SubjectRe: [PATCH 1/3] signals: Allow generation of SIGKILL to exiting task.
    Andrey Grodzovsky <andrey.grodzovsky@amd.com> writes:

    > Currently calling wait_event_killable as part of exiting process
    > will stall forever since SIGKILL generation is suppresed by PF_EXITING.
    >
    > In our partilaur case AMDGPU driver wants to flush all GPU jobs in
    > flight before shutting down. But if some job hangs the pipe we still want to
    > be able to kill it and avoid a process in D state.

    This makes me profoundly uncomfotable. You are changing the linux
    semantics of what it means for a process to be exiting. Functionally
    this may require all kinds of changes to when we allow processes to stop
    processing signals.

    So without a really good thought out explanation that takes into account
    all of the issues involved in process exiting and posix conformance.

    Nacked-by: "Eric W. Biederman" <ebiederm@xmission.com>

    Eric

    > Signed-off-by: Andrey Grodzovsky <andrey.grodzovsky@amd.com>
    > ---
    > kernel/signal.c | 4 ++--
    > 1 file changed, 2 insertions(+), 2 deletions(-)
    >
    > diff --git a/kernel/signal.c b/kernel/signal.c
    > index c6e4c83..c49c706 100644
    > --- a/kernel/signal.c
    > +++ b/kernel/signal.c
    > @@ -886,10 +886,10 @@ static inline int wants_signal(int sig, struct task_struct *p)
    > {
    > if (sigismember(&p->blocked, sig))
    > return 0;
    > - if (p->flags & PF_EXITING)
    > - return 0;
    > if (sig == SIGKILL)
    > return 1;
    > + if (p->flags & PF_EXITING)
    > + return 0;
    > if (task_is_stopped_or_traced(p))
    > return 0;
    > return task_curr(p) || !signal_pending(p);

    \
     
     \ /
      Last update: 2018-04-24 18:13    [W:5.126 / U:0.332 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site