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>
(cherry picked from commit 29f077d070519a88a793fbc70f1e6484dc6d9e35)
Signed-off-by: Robert Kolchmeyer <rkolchmeyer@google.com>

BUG=b/233372478
TEST=presubmit
RELEASE_NOTE=[TODO: see b/233372478 for details]

cos-patch: bug
Change-Id: Ibdc556e65858fc6e0c64c6f4d845b0aa0ea387ba
Reviewed-on: https://cos-review.googlesource.com/c/third_party/kernel/+/33061
Reviewed-by: Vaibhav Rustagi <vaibhavrustagi@google.com>
Tested-by: Cusky Presubmit Bot <presubmit@cos-infra-prod.iam.gserviceaccount.com>
1 file changed