Patch "io_uring/fs: consider link->flags when getting path for LINKAT" has been added to the 5.15-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/fs: consider link->flags when getting path for LINKAT

to the 5.15-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-fs-consider-link-flags-when-getting-path-for-linkat.patch
and it can be found in the queue-5.15 subdirectory.

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


>From 8479063f1fbee201a8739130e816cc331b675838 Mon Sep 17 00:00:00 2001
From: Charles Mirabile <cmirabil@xxxxxxxxxx>
Date: Mon, 20 Nov 2023 05:55:45 -0500
Subject: io_uring/fs: consider link->flags when getting path for LINKAT

From: Charles Mirabile <cmirabil@xxxxxxxxxx>

commit 8479063f1fbee201a8739130e816cc331b675838 upstream.

In order for `AT_EMPTY_PATH` to work as expected, the fact
that the user wants that behavior needs to make it to `getname_flags`
or it will return ENOENT.

Fixes: cf30da90bc3a ("io_uring: add support for IORING_OP_LINKAT")
Cc:  <stable@xxxxxxxxxxxxxxx>
Link: https://github.com/axboe/liburing/issues/995
Signed-off-by: Charles Mirabile <cmirabil@xxxxxxxxxx>
Link: https://lore.kernel.org/r/20231120105545.1209530-1-cmirabil@xxxxxxxxxx
Signed-off-by: Jens Axboe <axboe@xxxxxxxxx>
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
---
 io_uring/io_uring.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/io_uring/io_uring.c
+++ b/io_uring/io_uring.c
@@ -4049,7 +4049,7 @@ static int io_linkat_prep(struct io_kioc
 	newf = u64_to_user_ptr(READ_ONCE(sqe->addr2));
 	lnk->flags = READ_ONCE(sqe->hardlink_flags);
 
-	lnk->oldpath = getname(oldf);
+	lnk->oldpath = getname_uflags(oldf, lnk->flags);
 	if (IS_ERR(lnk->oldpath))
 		return PTR_ERR(lnk->oldpath);
 


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

queue-5.15/io_uring-fs-consider-link-flags-when-getting-path-for-linkat.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