summaryrefslogtreecommitdiff
path: root/fs
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2021-12-04 08:34:59 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2021-12-04 08:34:59 -0800
commit8b9a02280ebe209ae14fc478b0285745544a257c (patch)
treef82a06767a2a811b643946e5b08c46d3824c4cbe /fs
parente3b8bb4547d4a6e92f7da45db1e68c170e2d409f (diff)
parenta226abcd5d427fe9d42efc442818a4a1821e2664 (diff)
Merge tag 'io_uring-5.16-2021-12-03' of git://git.kernel.dk/linux-block
Pull io_uring fix from Jens Axboe: "Just a single fix preventing repeated retries of task_work based io-wq thread creation, fixing a regression from when io-wq was made more (a bit too much) resilient against signals" * tag 'io_uring-5.16-2021-12-03' of git://git.kernel.dk/linux-block: io-wq: don't retry task_work creation failure on fatal conditions
Diffstat (limited to 'fs')
-rw-r--r--fs/io-wq.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/fs/io-wq.c b/fs/io-wq.c
index 88202de519f6..50cf9f92da36 100644
--- a/fs/io-wq.c
+++ b/fs/io-wq.c
@@ -714,6 +714,13 @@ static bool io_wq_work_match_all(struct io_wq_work *work, void *data)
static inline bool io_should_retry_thread(long err)
{
+ /*
+ * Prevent perpetual task_work retry, if the task (or its group) is
+ * exiting.
+ */
+ if (fatal_signal_pending(current))
+ return false;
+
switch (err) {
case -EAGAIN:
case -ERESTARTSYS: