fs/xattr: Fix handling of AT_FDCWD in setxattrat(2) and getxattrat(2)
authorJan Kara <jack@suse.cz>
Thu, 24 Apr 2025 13:22:47 +0000 (15:22 +0200)
committerChristian Brauner <brauner@kernel.org>
Fri, 25 Apr 2025 10:11:56 +0000 (12:11 +0200)
commitf520bed25d17bb31c2d2d72b0a785b593a4e3179
tree77833e633b3740237be87196a49669d14c5d4b3e
parent1d28f25d6a6c968ebee8ee6d5b65691d5bfcf95f
fs/xattr: Fix handling of AT_FDCWD in setxattrat(2) and getxattrat(2)

Currently, setxattrat(2) and getxattrat(2) are wrongly handling the
calls of the from setxattrat(AF_FDCWD, NULL, AT_EMPTY_PATH, ...) and
fail with -EBADF error instead of operating on CWD. Fix it.

Fixes: 6140be90ec70 ("fs/xattr: add *at family syscalls")
Signed-off-by: Jan Kara <jack@suse.cz>
Link: https://lore.kernel.org/20250424132246.16822-2-jack@suse.cz
Signed-off-by: Christian Brauner <brauner@kernel.org>
fs/xattr.c