io-wq: don't retry task_work creation failure on fatal conditions
authorJens Axboe <axboe@kernel.dk>
Fri, 3 Dec 2021 02:40:15 +0000 (19:40 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 8 Dec 2021 08:04:53 +0000 (09:04 +0100)
commit690637ec04427b30bf8f86de422e79759a71e306
tree8ffa49e9021f5fc8205a518ccecad5e6b497b49a
parent894b21da042f94f23f1bcbe7362b54b1657aa345
io-wq: don't retry task_work creation failure on fatal conditions

[ Upstream commit a226abcd5d427fe9d42efc442818a4a1821e2664 ]

We don't want to be retrying task_work creation failure if there's
an actual signal pending for the parent task. If we do, then we can
enter an infinite loop of perpetually retrying and each retry failing
with -ERESTARTNOINTR because a signal is pending.

Fixes: 3146cba99aa2 ("io-wq: make worker creation resilient against signals")
Reported-by: Florian Fischer <florian.fl.fischer@fau.de>
Link: https://lore.kernel.org/io-uring/20211202165606.mqryio4yzubl7ms5@pasture/
Tested-by: Florian Fischer <florian.fl.fischer@fau.de>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Sasha Levin <sashal@kernel.org>
fs/io-wq.c