Skip to content

Commit 88a9e03

Browse files
huangyumDarrick J. Wong
authored andcommitted
xfs: Fix assert failure in xfs_setattr_size()
An 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. Signed-off-by: Yumei Huang <yuhuang@redhat.com> Reviewed-by: Brian Foster <bfoster@redhat.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Darrick J. Wong <djwong@kernel.org> Signed-off-by: Darrick J. Wong <djwong@kernel.org>
1 parent 01ea173 commit 88a9e03

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎fs/xfs/xfs_iops.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -846,7 +846,7 @@ xfs_setattr_size(
846846
ASSERT(xfs_isilocked(ip, XFS_MMAPLOCK_EXCL));
847847
ASSERT(S_ISREG(inode->i_mode));
848848
ASSERT((iattr->ia_valid & (ATTR_UID|ATTR_GID|ATTR_ATIME|ATTR_ATIME_SET|
849-
ATTR_MTIME_SET|ATTR_KILL_PRIV|ATTR_TIMES_SET)) == 0);
849+
ATTR_MTIME_SET|ATTR_TIMES_SET)) == 0);
850850

851851
oldsize = inode->i_size;
852852
newsize = iattr->ia_size;

0 commit comments

Comments
 (0)