Skip to content

Commit

Permalink
Merge tag 'io_uring-5.16-2021-12-03' of git://git.kernel.dk/linux-block
Browse files Browse the repository at this point in the history
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
  • Loading branch information
Linus Torvalds committed Dec 4, 2021
2 parents e3b8bb4 + a226abc commit 8b9a022
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions fs/io-wq.c
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 8b9a022

Please sign in to comment.