]> www.infradead.org Git - users/dwmw2/linux.git/commit
io_uring: always use original task when preparing req identity
authorJens Axboe <axboe@kernel.dk>
Mon, 16 May 2022 21:05:51 +0000 (23:05 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 18 May 2022 08:23:48 +0000 (10:23 +0200)
commit29f077d070519a88a793fbc70f1e6484dc6d9e35
tree738a1b4a00f6e6d316d80a820f035cd00622a16a
parent1444e0568bc2c70868e7b8da5b46fc2252acc3f5
io_uring: always use original task when preparing req identity

If the ring is setup with IORING_SETUP_IOPOLL and we have more than
one task doing submissions on a ring, we can up in a situation where
we assign the context from the current task rather than the request
originator.

Always use req->task rather than assume it's the same as current.

No upstream patch exists for this issue, as only older kernels with
the non-native workers have this problem.

Reported-by: Kyle Zeng <zengyhkyle@gmail.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/io_uring.c