io_uring: make ctx cancel on exit targeted to actual ctx
authorJens Axboe <axboe@kernel.dk>
Sun, 20 Dec 2020 17:45:02 +0000 (10:45 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 30 Dec 2020 10:54:04 +0000 (11:54 +0100)
commit7b81e2af5a55b07016afa81123d40acf70c994c0
tree2e9dc84afe19c43cbaa66ac7fb1d85ab19395696
parent5998fe548db9496ad0d151148ff1c6dbe1e0dacc
io_uring: make ctx cancel on exit targeted to actual ctx

commit 00c18640c2430c4bafaaeede1f9dd6f7ec0e4b25 upstream.

Before IORING_SETUP_ATTACH_WQ, we could just cancel everything on the
io-wq when exiting. But that's not the case if they are shared, so
cancel for the specific ctx instead.

Cc: stable@vger.kernel.org
Fixes: 24369c2e3bb0 ("io_uring: add io-wq workqueue sharing")
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/io_uring.c