]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
skip permission checks for extended attributes
authorAmeer Hamza <ahamza@ixsystems.com>
Tue, 22 Nov 2022 20:28:13 +0000 (01:28 +0500)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Thu, 5 Jan 2023 19:10:28 +0000 (11:10 -0800)
commit75fbe7eb99c3d20403c79c7e24a97997c424313a
treee485cede0f2431e70aa0fbb6f29357f10ad5997e
parentd0f350c96232b64f78dd5cc3934117784e2f2228
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.

Signed-off-by: Ameer Hamza <ahamza@ixsystems.com>
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