io_uring: add reschedule point to handle_tw_list()
authorJens Axboe <axboe@kernel.dk>
Fri, 27 Jan 2023 17:00:13 +0000 (10:00 -0700)
committerJens Axboe <axboe@kernel.dk>
Fri, 27 Jan 2023 17:00:13 +0000 (10:00 -0700)
commitb408febf371c300a2d6129512f84b3e2e4cfd7c8
treebc11aa54e3d638466f8b4e12c5a22881fd261841
parent385289efa0da84453228d1bf603b7c1682b49a0e
io_uring: add reschedule point to handle_tw_list()

commit 68aab7f33d7ef1d52b88000fa6afdc3d648a55ff upstream.

If CONFIG_PREEMPT_NONE is set and the task_work chains are long, we
could be running into issues blocking others for too long. Add a
reschedule check in handle_tw_list(), and flush the ctx if we need to
reschedule.

Cc: stable@vger.kernel.org # 5.10+
Signed-off-by: Jens Axboe <axboe@kernel.dk>
io_uring/io_uring.c