@@ -317,6 +317,8 @@ xfs_attrlist_by_handle(
*/
if (al_hreq.flags & ~(ATTR_ROOT | ATTR_SECURE))
return -EINVAL;
+ if (al_hreq.flags == (ATTR_ROOT | ATTR_SECURE))
+ return -EINVAL;
dentry = xfs_handlereq_to_dentry(parfilp, &al_hreq.hreq);
if (IS_ERR(dentry))
@@ -375,6 +375,8 @@ xfs_compat_attrlist_by_handle(
*/
if (al_hreq.flags & ~(ATTR_ROOT | ATTR_SECURE))
return -EINVAL;
+ if (al_hreq.flags == (ATTR_ROOT | ATTR_SECURE))
+ return -EINVAL;
dentry = xfs_compat_handlereq_to_dentry(parfilp, &al_hreq.hreq);
if (IS_ERR(dentry))