lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1524583836-12130-2-git-send-email-andrey.grodzovsky@amd.com>
Date:   Tue, 24 Apr 2018 11:30:34 -0400
From:   Andrey Grodzovsky <andrey.grodzovsky@....com>
To:     <linux-kernel@...r.kernel.org>, <amd-gfx@...ts.freedesktop.org>
CC:     <Alexander.Deucher@....com>, <Christian.Koenig@....com>,
        <David.Panariti@....com>, <oleg@...hat.com>,
        <akpm@...ux-foundation.org>, <ebiederm@...ssion.com>,
        Andrey Grodzovsky <andrey.grodzovsky@....com>
Subject: [PATCH 1/3] signals: Allow generation of SIGKILL to exiting task.

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.

Signed-off-by: Andrey Grodzovsky <andrey.grodzovsky@....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);
-- 
2.7.4

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ