[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20210320153832.1033687-3-axboe@kernel.dk>
Date: Sat, 20 Mar 2021 09:38:32 -0600
From: Jens Axboe <axboe@...nel.dk>
To: io-uring@...r.kernel.org
Cc: torvalds@...ux-foundation.org, ebiederm@...ssion.com,
linux-kernel@...r.kernel.org, oleg@...hat.com,
Jens Axboe <axboe@...nel.dk>,
Stefan Metzmacher <metze@...ba.org>
Subject: [PATCH 2/2] signal: don't allow STOP on PF_IO_WORKER threads
Just like we don't allow normal signals to IO threads, don't deliver a
STOP to a task that has PF_IO_WORKER set. The IO threads don't take
signals in general, and have no means of flushing out a stop either.
Reported-by: Stefan Metzmacher <metze@...ba.org>
Signed-off-by: Jens Axboe <axboe@...nel.dk>
---
kernel/signal.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/kernel/signal.c b/kernel/signal.c
index 730ecd3d6faf..b113bf647fb4 100644
--- a/kernel/signal.c
+++ b/kernel/signal.c
@@ -2349,6 +2349,10 @@ static bool do_signal_stop(int signr)
t = current;
while_each_thread(current, t) {
+ /* don't STOP PF_IO_WORKER threads */
+ if (t->flags & PF_IO_WORKER)
+ continue;
+
/*
* Setting state to TASK_STOPPED for a group
* stop is always done with the siglock held,
--
2.31.0
Powered by blists - more mailing lists