Skip to content

Commit b8cdd25

Browse files
author
Al Viro
committed
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 <[email protected]> Reviewed-by: Jens Axboe <[email protected]> Signed-off-by: Al Viro <[email protected]>
1 parent dc7e76b commit b8cdd25

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

io_uring/xattr.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ int io_getxattr_prep(struct io_kiocb *req, const struct io_uring_sqe *sqe)
9696

9797
path = u64_to_user_ptr(READ_ONCE(sqe->addr3));
9898

99-
ix->filename = getname_flags(path, LOOKUP_FOLLOW);
99+
ix->filename = getname(path);
100100
if (IS_ERR(ix->filename)) {
101101
ret = PTR_ERR(ix->filename);
102102
ix->filename = NULL;
@@ -189,7 +189,7 @@ int io_setxattr_prep(struct io_kiocb *req, const struct io_uring_sqe *sqe)
189189

190190
path = u64_to_user_ptr(READ_ONCE(sqe->addr3));
191191

192-
ix->filename = getname_flags(path, LOOKUP_FOLLOW);
192+
ix->filename = getname(path);
193193
if (IS_ERR(ix->filename)) {
194194
ret = PTR_ERR(ix->filename);
195195
ix->filename = NULL;

0 commit comments

Comments
 (0)