HomeFreeBSD

Skip permission checks for extended attributes

Description

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

Details

Provenance
Ameer Hamza <106930537+ixhamza@users.noreply.github.com>Authored on Dec 12 2022, 6:21 PM
GitHub <noreply@github.com>Committed on Dec 12 2022, 6:21 PM
Parents
rGf900279e6daf: Restrict visibility of per-dataset kstats inside FreeBSD jails
Branches
Unknown
Tags
Unknown

Event Timeline

GitHub <noreply@github.com> committed rGe3785718bac2: Skip permission checks for extended attributes (authored by Ameer Hamza <106930537+ixhamza@users.noreply.github.com>).Dec 12 2022, 6:21 PM