]> git.proxmox.com Git - mirror_zfs.git/commit - module/os/linux/zfs/zfs_vnops_os.c
Skip permission checks for extended attributes
authorAmeer Hamza <106930537+ixhamza@users.noreply.github.com>
Mon, 12 Dec 2022 18:21:37 +0000 (23:21 +0500)
committerGitHub <noreply@github.com>
Mon, 12 Dec 2022 18:21:37 +0000 (10:21 -0800)
commite3785718bac2ee21664ad6a2b7b503f82f533425
tree4bd7997f5c02b3140947d2333d7cb59d50624494
parentf900279e6dafeeef3398ea5c65fd174a2746a013
Skip permission checks for extended attributes

zfs_zaccess_trivial() calls the generic_permission() to read
xattr attributes. This causes deadlock if called from
zpl_xattr_set_dir() context as xattr and the dent locks are
already held in this scenario. This commit skips the permissions
checks for extended attributes since the Linux VFS stack already
checks it before passing us the control.

Reviewed-by: Ryan Moeller <ryan@iXsystems.com>
Reviewed-by: Alexander Motin <mav@FreeBSD.org>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Youzhong Yang <yyang@mathworks.com>
Signed-off-by: Ameer Hamza <ahamza@ixsystems.com>
Closes #14220
module/os/linux/zfs/zfs_dir.c
module/os/linux/zfs/zfs_vnops_os.c
module/os/linux/zfs/zpl_xattr.c
tests/zfs-tests/tests/functional/acl/posix/posix_004_pos.ksh