io_uring: add reschedule point to handle_tw_list()
authorJens Axboe <axboe@kernel.dk>
Fri, 27 Jan 2023 16:50:31 +0000 (09:50 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 10 Mar 2023 08:34:03 +0000 (09:34 +0100)
commitd9399e543062251cc6102e7e5d80f3bd79115316
tree6cda2d75d247054ff41faa3e51f80a61a815193e
parent42fe280e267a120724e139732bc7db9e13fd1914
io_uring: add reschedule point to handle_tw_list()

commit f58680085478dd292435727210122960d38e8014 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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
io_uring/io_uring.c