io_uring: use TWA_SIGNAL for task_work uncondtionally
authorJens Axboe <axboe@kernel.dk>
Fri, 7 Aug 2020 01:41:50 +0000 (19:41 -0600)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 19 Aug 2020 06:24:15 +0000 (08:24 +0200)
commit175852503b41b3b74ffd99789240fa21ea1b8584
treee64b6df46d88ee2a990e695c7128f0c0403ca4b0
parent6152c035f87821b3150d2c302f3f38b498e54ebe
io_uring: use TWA_SIGNAL for task_work uncondtionally

commit 0ba9c9edcd152158a0e321a4c13ac1dfc571ff3d upstream.

An earlier commit:

b7db41c9e03b ("io_uring: fix regression with always ignoring signals in io_cqring_wait()")

ensured that we didn't get stuck waiting for eventfd reads when it's
registered with the io_uring ring for event notification, but we still
have cases where the task can be waiting on other events in the kernel and
need a bigger nudge to make forward progress. Or the task could be in the
kernel and running, but on its way to blocking.

This means that TWA_RESUME cannot reliably be used to ensure we make
progress. Use TWA_SIGNAL unconditionally.

Cc: stable@vger.kernel.org # v5.7+
Reported-by: Josef <josef.grieb@gmail.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/io_uring.c