UPSTREAM: 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.
Bug: 278721720
Reported-and-tested-by: Lee Jones <lee@kernel.org>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit b0bfceaa8c)
Signed-off-by: Lee Jones <joneslee@google.com>
Change-Id: I112708bdbe43f0e1c2cad5e73a56d7609c10d339
This commit is contained in:
parent
d4fabc5cbb
commit
ce6a504d69
1 changed files with 0 additions and 3 deletions
|
|
@ -3735,9 +3735,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) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue