mirror of
https://github.com/torvalds/linux.git
synced 2024-11-21 19:41:42 +00:00
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>
This commit is contained in:
parent
dc7e76ba7a
commit
b8cdd2530c
@ -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));
|
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)) {
|
if (IS_ERR(ix->filename)) {
|
||||||
ret = PTR_ERR(ix->filename);
|
ret = PTR_ERR(ix->filename);
|
||||||
ix->filename = NULL;
|
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));
|
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)) {
|
if (IS_ERR(ix->filename)) {
|
||||||
ret = PTR_ERR(ix->filename);
|
ret = PTR_ERR(ix->filename);
|
||||||
ix->filename = NULL;
|
ix->filename = NULL;
|
||||||
|
Loading…
Reference in New Issue
Block a user