diff options
author | Ameer Hamza <[email protected]> | 2022-12-12 23:21:37 +0500 |
---|---|---|
committer | GitHub <[email protected]> | 2022-12-12 10:21:37 -0800 |
commit | e3785718bac2ee21664ad6a2b7b503f82f533425 (patch) | |
tree | 4bd7997f5c02b3140947d2333d7cb59d50624494 /module/os/linux/zfs/zfs_dir.c | |
parent | f900279e6dafeeef3398ea5c65fd174a2746a013 (diff) |
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 <[email protected]>
Reviewed-by: Alexander Motin <[email protected]>
Reviewed-by: Brian Behlendorf <[email protected]>
Reviewed-by: Youzhong Yang <[email protected]>
Signed-off-by: Ameer Hamza <[email protected]>
Closes #14220
Diffstat (limited to 'module/os/linux/zfs/zfs_dir.c')
-rw-r--r-- | module/os/linux/zfs/zfs_dir.c | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/module/os/linux/zfs/zfs_dir.c b/module/os/linux/zfs/zfs_dir.c index 85aa94d8d..09eac37f9 100644 --- a/module/os/linux/zfs/zfs_dir.c +++ b/module/os/linux/zfs/zfs_dir.c @@ -1112,10 +1112,6 @@ zfs_make_xattrdir(znode_t *zp, vattr_t *vap, znode_t **xzpp, cred_t *cr) *xzpp = NULL; - if ((error = zfs_zaccess(zp, ACE_WRITE_NAMED_ATTRS, 0, B_FALSE, cr, - kcred->user_ns))) - return (error); - if ((error = zfs_acl_ids_create(zp, IS_XATTR, vap, cr, NULL, &acl_ids, kcred->user_ns)) != 0) return (error); |