io_uring: explicitly catch any illegal async queue attempt
authorJens Axboe <axboe@kernel.dk>
Fri, 23 Jul 2021 17:53:54 +0000 (11:53 -0600)
committerJens Axboe <axboe@kernel.dk>
Fri, 23 Jul 2021 22:44:51 +0000 (16:44 -0600)
commit991468dcf198bb87f24da330676724a704912b47
treefae574f2aeff461ddfa0e95389f4246960643555
parent3c30ef0f78cfb36fdb13753794b0384cf7e37cc9
io_uring: explicitly catch any illegal async queue attempt

Catch an illegal case to queue async from an unrelated task that got
the ring fd passed to it. This should not be possible to hit, but
better be proactive and catch it explicitly. io-wq is extended to
check for early IO_WQ_WORK_CANCEL being set on a work item as well,
so it can run the request through the normal cancelation path.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
fs/io-wq.c
fs/io_uring.c