xfs: Fix assert failure in xfs_setattr_size()
PATCH 1/1 xfs: Fix assert failure in xfs_setattr_size()
In reply to a message not in the archiveAn assert failure is triggered by syzkaller test due to ATTR_KILL_PRIV is not cleared before xfs_setattr_size. As ATTR_KILL_PRIV is not checked/used by xfs_setattr_size, just remove it from the assert.
--- fs/xfs/xfs_iops.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
fs/xfs/xfs_iops.c +1 -1
@@ -846,7 +846,7 @@ASSERT (xfs_isilocked (ip,XFS_MMAPLOCK_EXCL ));ASSERT (S_ISREG (inode->i_mode));ASSERT ((iattr->ia_valid & (ATTR_UID |ATTR_GID |ATTR_ATIME |ATTR_ATIME_SET | -ATTR_MTIME_SET |ATTR_KILL_PRIV |ATTR_TIMES_SET )) ==0 ); +ATTR_MTIME_SET |ATTR_TIMES_SET )) ==0 ); oldsize = inode->i_size; newsize = iattr->ia_size;
Signature · 1 line
1.8.3.1
Quoted 7 lines · Yumei Huang
An assert failure is triggered by syzkaller test due to
ATTR_KILL_PRIVis not cleared beforexfs_setattr_size. AsATTR_KILL_PRIVis not checked/used byxfs_setattr_size, just remove it from the assert.Signed-off-by Yumei Huang <[email protected]>---
LGTM. Thanks for the patch.
Quoted 19 lines
fs/xfs/xfs_iops.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)fs/xfs/xfs_iops.c +1
-1@@ -846,7 +846,7 @@ASSERT (xfs_isilocked (ip,XFS_MMAPLOCK_EXCL ));ASSERT (S_ISREG (inode->i_mode));ASSERT ((iattr->ia_valid & (ATTR_UID |ATTR_GID |ATTR_ATIME |ATTR_ATIME_SET | -ATTR_MTIME_SET |ATTR_KILL_PRIV |ATTR_TIMES_SET )) ==0 ); +ATTR_MTIME_SET |ATTR_TIMES_SET )) ==0 ); oldsize = inode->i_size; newsize = iattr->ia_size;Signature · 1 line
1.8.3.1
Quoted 6 lines · Yumei Huang
An assert failure is triggered by syzkaller test due to
ATTR_KILL_PRIVis not cleared beforexfs_setattr_size. AsATTR_KILL_PRIVis not checked/used byxfs_setattr_size, just remove it from the assert.Signed-off-by Yumei Huang <[email protected]>
Looks good,
Quoted 6 lines · Yumei Huang
An assert failure is triggered by syzkaller test due to
ATTR_KILL_PRIVis not cleared beforexfs_setattr_size. AsATTR_KILL_PRIVis not checked/used byxfs_setattr_size, just remove it from the assert.Signed-off-by Yumei Huang <[email protected]>
Looks ok,
--D
Quoted 20 lines
--- fs/xfs/xfs_iops.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)fs/xfs/xfs_iops.c +1
-1@@ -846,7 +846,7 @@ASSERT (xfs_isilocked (ip,XFS_MMAPLOCK_EXCL ));ASSERT (S_ISREG (inode->i_mode));ASSERT ((iattr->ia_valid & (ATTR_UID |ATTR_GID |ATTR_ATIME |ATTR_ATIME_SET | -ATTR_MTIME_SET |ATTR_KILL_PRIV |ATTR_TIMES_SET )) ==0 ); +ATTR_MTIME_SET |ATTR_TIMES_SET )) ==0 ); oldsize = inode->i_size; newsize = iattr->ia_size;Signature · 1 line
1.8.3.1