Commit 5a7c3f60 authored by Lee Jones's avatar Lee Jones Committed by Todd Kjos
Browse files

FROMGIT: io_uring: Use original task for req identity in io_identity_cow()



This issue is conceptually identical to the one fixed in 29f077d0
("io_uring: always use original task when preparing req identity"), so
rather than reinvent the wheel, I'm shamelessly quoting the commit
message from that patch - thanks Jens:

 "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."

Bug: 238177383
Cc: Jens Axboe <axboe@kernel.dk>
Cc: Pavel Begunkov <asml.silence@gmail.com>
Cc: Alexander Viro <viro@zeniv.linux.org.uk>
Cc: io-uring@vger.kernel.org
Cc: linux-fsdevel@vger.kernel.org
Fixes: 5c3462cf ("io_uring: store io_identity in io_uring_task")
Signed-off-by: default avatarLee Jones <lee@kernel.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit 2ee0cab1
git: //git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-5.10.y)
Signed-off-by: default avatarLee Jones <joneslee@google.com>
Change-Id: I98adc653dbe03f8e9d214d9430fe50d351a45910
parent 639f0e59
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment