]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
io_uring: fix 'sync' handling of io_fallback_tw()
authorJens Axboe <axboe@kernel.dk>
Thu, 24 Apr 2025 16:28:14 +0000 (10:28 -0600)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 2 May 2025 05:50:47 +0000 (07:50 +0200)
commitb675b4c863f1dcfef44b6dc6f4c06212ae44288e
treed68509b694f13271c371ae72da6517a27b00d27a
parent20a3f73dd424e4ac5a2d5c78430721cae6352dda
io_uring: fix 'sync' handling of io_fallback_tw()

commit edd43f4d6f50ec3de55a0c9e9df6348d1da51965 upstream.

A previous commit added a 'sync' parameter to io_fallback_tw(), which if
true, means the caller wants to wait on the fallback thread handling it.
But the logic is somewhat messed up, ensure that ctxs are swapped and
flushed appropriately.

Cc: stable@vger.kernel.org
Fixes: dfbe5561ae93 ("io_uring: flush offloaded and delayed task_work on exit")
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
io_uring/io_uring.c