]> git.baikalelectronics.ru Git - kernel.git/commit
io_uring: ensure workqueue offload grabs ring mutex for poll list
authorJens Axboe <axboe@kernel.dk>
Thu, 16 Jan 2020 04:51:17 +0000 (21:51 -0700)
committerJens Axboe <axboe@kernel.dk>
Thu, 16 Jan 2020 04:51:17 +0000 (21:51 -0700)
commit7ec2e3a8eb114c6289f177cbeedb336dac3dcd49
tree6ffcfb94ea666db7b6a2cebefd2ad9a92958f38d
parentc3d0ead61a3ccfde027de84dc6c7f43d595cb9c6
io_uring: ensure workqueue offload grabs ring mutex for poll list

A previous commit moved the locking for the async sqthread, but didn't
take into account that the io-wq workers still need it. We can't use
req->in_async for this anymore as both the sqthread and io-wq workers
set it, gate the need for locking on io_wq_current_is_worker() instead.

Fixes: 35b48d785b8b ("io_uring: sqthread should grab ctx->uring_lock for submissions")
Reported-by: Bijan Mottahedeh <bijan.mottahedeh@oracle.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
fs/io_uring.c