Patch "io_uring: Use original task for req identity in io_identity_cow()" has been added to the 5.10-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

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

to the 5.10-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     io_uring-use-original-task-for-req-identity-in-io_identity_cow.patch
and it can be found in the queue-5.10 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.


>From lee@xxxxxxxxxx  Sat Jul 23 15:54:25 2022
From: Lee Jones <lee@xxxxxxxxxx>
Date: Tue, 19 Jul 2022 12:52:51 +0100
Subject: io_uring: Use original task for req identity in io_identity_cow()
To: lee@xxxxxxxxxx
Cc: stable@xxxxxxxxxxxxxxx, Jens Axboe <axboe@xxxxxxxxx>, Pavel Begunkov <asml.silence@xxxxxxxxx>, Alexander Viro <viro@xxxxxxxxxxxxxxxxxx>, io-uring@xxxxxxxxxxxxxxx, linux-fsdevel@xxxxxxxxxxxxxxx
Message-ID: <20220719115251.441526-1-lee@xxxxxxxxxx>

From: Lee Jones <lee@xxxxxxxxxx>

This issue is conceptually identical to the one fixed in 29f077d07051
("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."

Cc: Jens Axboe <axboe@xxxxxxxxx>
Cc: Pavel Begunkov <asml.silence@xxxxxxxxx>
Cc: Alexander Viro <viro@xxxxxxxxxxxxxxxxxx>
Cc: io-uring@xxxxxxxxxxxxxxx
Cc: linux-fsdevel@xxxxxxxxxxxxxxx
Fixes: 5c3462cfd123b ("io_uring: store io_identity in io_uring_task")
Signed-off-by: Lee Jones <lee@xxxxxxxxxx>
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
---
 fs/io_uring.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/fs/io_uring.c
+++ b/fs/io_uring.c
@@ -1325,7 +1325,7 @@ static void io_req_clean_work(struct io_
  */
 static bool io_identity_cow(struct io_kiocb *req)
 {
-	struct io_uring_task *tctx = current->io_uring;
+	struct io_uring_task *tctx = req->task->io_uring;
 	const struct cred *creds = NULL;
 	struct io_identity *id;
 


Patches currently in stable-queue which might be from lee@xxxxxxxxxx are

queue-5.10/io_uring-use-original-task-for-req-identity-in-io_identity_cow.patch



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux