From: Vladimir Saveliev Date: Fri, 8 Dec 2023 16:55:57 +0000 (+0300) Subject: LU-18088 osd: use __vfs_getxattr X-Git-Tag: 2.15.90~48 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=refs%2Fchanges%2F17%2F55917%2F4;p=fs%2Flustre-release.git LU-18088 osd: use __vfs_getxattr vfs_getxattr() is not suitable for osd. To get security xattr it goes via: vfs_getxattr xattr_getsecurity security_inode_getsecurity cap_inode_getsecurity dentry = d_find_any_alias(inode) if (!dentry) return -EINVAL; and return -EINVAL because osd object inodes have empty alias list. Use __vfs_getxattr() instead. Fixes: b9ef5d1e7f7 ("LU-17546 osd: use __vfs_removexattr") HPE-bug-id: LUS-12018 Signed-off-by: Vladimir Saveliev Change-Id: I71ed0141ebf5124d4ff0862c24fd719f29d883ae Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/55917 Tested-by: jenkins Tested-by: Maloo Reviewed-by: Shaun Tancheff Reviewed-by: Alex Zhuravlev Reviewed-by: Oleg Drokin Reviewed-by: Qian Yingjin --- diff --git a/lustre/include/lustre_compat.h b/lustre/include/lustre_compat.h index c54eaab..e77df24 100644 --- a/lustre/include/lustre_compat.h +++ b/lustre/include/lustre_compat.h @@ -561,9 +561,8 @@ static inline int ll_vfs_getxattr(struct dentry *dentry, struct inode *inode, const char *name, void *value, size_t size) { -#if defined(HAVE_MNT_IDMAP_ARG) || defined(HAVE_USER_NAMESPACE_ARG) - return vfs_getxattr(&nop_mnt_idmap, dentry, name, value, size); -#elif defined(HAVE_VFS_SETXATTR) +#if defined(HAVE_MNT_IDMAP_ARG) || defined(HAVE_USER_NAMESPACE_ARG) || \ + defined(HAVE_VFS_SETXATTR) return __vfs_getxattr(dentry, inode, name, value, size); #else if (unlikely(!inode->i_op->getxattr)) diff --git a/lustre/tests/sanity-sec.sh b/lustre/tests/sanity-sec.sh index 867df37..1a641cd 100755 --- a/lustre/tests/sanity-sec.sh +++ b/lustre/tests/sanity-sec.sh @@ -15,10 +15,6 @@ init_test_env $@ init_logging ALWAYS_EXCEPT="$SANITY_SEC_EXCEPT " -if [[ "$MDS1_OS_ID_LIKE" =~ "rhel" ]] && - (( $MDS1_OS_VERSION_CODE >= $(version_code 9.3) )); then - always_except LU-16915 51 -fi [[ "$SLOW" == "no" ]] && EXCEPT_SLOW="26"