* [PATCH] io_uring/fs: consider link->flags when getting path for LINKAT
@ 2023-11-20 10:55 Charles Mirabile
2023-11-20 15:59 ` Jens Axboe
2023-11-20 16:18 ` Jens Axboe
0 siblings, 2 replies; 5+ messages in thread
From: Charles Mirabile @ 2023-11-20 10:55 UTC (permalink / raw)
To: linux-kernel; +Cc: axboe, asml.silence, io-uring, Charles Mirabile, stable
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: [email protected]
Link: https://github.com/axboe/liburing/issues/995
Signed-off-by: Charles Mirabile <[email protected]>
---
io_uring/fs.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/io_uring/fs.c b/io_uring/fs.c
index 08e3b175469c..eccea851dd5a 100644
--- a/io_uring/fs.c
+++ b/io_uring/fs.c
@@ -254,7 +254,7 @@ int io_linkat_prep(struct io_kiocb *req, const struct io_uring_sqe *sqe)
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);
--
2.41.0
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] io_uring/fs: consider link->flags when getting path for LINKAT
2023-11-20 10:55 [PATCH] io_uring/fs: consider link->flags when getting path for LINKAT Charles Mirabile
@ 2023-11-20 15:59 ` Jens Axboe
2023-11-20 16:34 ` Charles Mirabile
2023-11-20 16:18 ` Jens Axboe
1 sibling, 1 reply; 5+ messages in thread
From: Jens Axboe @ 2023-11-20 15:59 UTC (permalink / raw)
To: Charles Mirabile, linux-kernel; +Cc: asml.silence, io-uring, stable
On 11/20/23 3:55 AM, Charles Mirabile wrote:
> 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.
Looks good - do you have a liburing test case for this too?
--
Jens Axboe
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] io_uring/fs: consider link->flags when getting path for LINKAT
2023-11-20 10:55 [PATCH] io_uring/fs: consider link->flags when getting path for LINKAT Charles Mirabile
2023-11-20 15:59 ` Jens Axboe
@ 2023-11-20 16:18 ` Jens Axboe
1 sibling, 0 replies; 5+ messages in thread
From: Jens Axboe @ 2023-11-20 16:18 UTC (permalink / raw)
To: linux-kernel, Charles Mirabile; +Cc: asml.silence, io-uring, stable
On Mon, 20 Nov 2023 05:55:45 -0500, Charles Mirabile wrote:
> 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.
>
>
Applied, thanks!
[1/1] io_uring/fs: consider link->flags when getting path for LINKAT
(no commit info)
Best regards,
--
Jens Axboe
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] io_uring/fs: consider link->flags when getting path for LINKAT
2023-11-20 15:59 ` Jens Axboe
@ 2023-11-20 16:34 ` Charles Mirabile
2023-11-20 16:38 ` Jens Axboe
0 siblings, 1 reply; 5+ messages in thread
From: Charles Mirabile @ 2023-11-20 16:34 UTC (permalink / raw)
To: Jens Axboe; +Cc: linux-kernel, asml.silence, io-uring, stable
On Mon, Nov 20, 2023 at 10:59 AM Jens Axboe <[email protected]> wrote:
>
> On 11/20/23 3:55 AM, Charles Mirabile wrote:
> > 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.
>
> Looks good - do you have a liburing test case for this too?
Yes, see here https://github.com/axboe/liburing/issues/995 and here
https://github.com/axboe/liburing/pull/996.
>
> --
> Jens Axboe
>
Best - Charlie
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] io_uring/fs: consider link->flags when getting path for LINKAT
2023-11-20 16:34 ` Charles Mirabile
@ 2023-11-20 16:38 ` Jens Axboe
0 siblings, 0 replies; 5+ messages in thread
From: Jens Axboe @ 2023-11-20 16:38 UTC (permalink / raw)
To: Charles Mirabile; +Cc: linux-kernel, asml.silence, io-uring, stable
On 11/20/23 9:34 AM, Charles Mirabile wrote:
> On Mon, Nov 20, 2023 at 10:59 AM Jens Axboe <[email protected]> wrote:
>>
>> On 11/20/23 3:55 AM, Charles Mirabile wrote:
>>> 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.
>>
>> Looks good - do you have a liburing test case for this too?
> Yes, see here https://github.com/axboe/liburing/issues/995 and here
> https://github.com/axboe/liburing/pull/996.
Ah thank you - for some reason github stopped notifying me...
--
Jens Axboe
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2023-11-20 16:38 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-11-20 10:55 [PATCH] io_uring/fs: consider link->flags when getting path for LINKAT Charles Mirabile
2023-11-20 15:59 ` Jens Axboe
2023-11-20 16:34 ` Charles Mirabile
2023-11-20 16:38 ` Jens Axboe
2023-11-20 16:18 ` Jens Axboe
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox