diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2024-09-20 00:28:00 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2024-11-03 13:28:56 -0500 |
commit | b8cdd2530c7d7156413c5dfc1f4bc83c1d26b446 (patch) | |
tree | ac36aad4edbdf51e51e53402add552ce6ece4a9c /io_uring | |
parent | dc7e76ba7a6057e4c12d449db49f026d0ec238ec (diff) | |
download | lwn-b8cdd2530c7d7156413c5dfc1f4bc83c1d26b446.tar.gz lwn-b8cdd2530c7d7156413c5dfc1f4bc83c1d26b446.zip |
io_[gs]etxattr_prep(): just use getname()
getname_flags(pathname, LOOKUP_FOLLOW) is obviously bogus - following
trailing symlinks has no impact on how to copy the pathname from userland...
Reviewed-by: Christian Brauner <brauner@kernel.org>
Reviewed-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'io_uring')
-rw-r--r-- | io_uring/xattr.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/io_uring/xattr.c b/io_uring/xattr.c index 4b68c282c91a..967c5d8da061 100644 --- a/io_uring/xattr.c +++ b/io_uring/xattr.c @@ -96,7 +96,7 @@ int io_getxattr_prep(struct io_kiocb *req, const struct io_uring_sqe *sqe) path = u64_to_user_ptr(READ_ONCE(sqe->addr3)); - ix->filename = getname_flags(path, LOOKUP_FOLLOW); + ix->filename = getname(path); if (IS_ERR(ix->filename)) { ret = PTR_ERR(ix->filename); ix->filename = NULL; @@ -189,7 +189,7 @@ int io_setxattr_prep(struct io_kiocb *req, const struct io_uring_sqe *sqe) path = u64_to_user_ptr(READ_ONCE(sqe->addr3)); - ix->filename = getname_flags(path, LOOKUP_FOLLOW); + ix->filename = getname(path); if (IS_ERR(ix->filename)) { ret = PTR_ERR(ix->filename); ix->filename = NULL; |