Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b0bfceaa authored by Jens Axboe's avatar Jens Axboe Committed by Greg Kroah-Hartman
Browse files

io_uring: always grab lock in io_cancel_async_work()



No upstream commit exists for this patch.

It's not necessarily safe to check the task_list locklessly, remove
this micro optimization and always grab task_lock before deeming it
empty.

Reported-and-tested-by: default avatarLee Jones <lee@kernel.org>
Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 00395fd7
Loading
Loading
Loading
Loading
+0 −3
Original line number Diff line number Diff line
@@ -3738,9 +3738,6 @@ static void io_cancel_async_work(struct io_ring_ctx *ctx,
{
	struct io_kiocb *req;

	if (list_empty(&ctx->task_list))
		return;

	spin_lock_irq(&ctx->task_lock);

	list_for_each_entry(req, &ctx->task_list, task_list) {