* [PATCH] xfs: Fix assert failure in xfs_setattr_size()
[not found] <316142100.64829455.1610706461022.JavaMail.zimbra@redhat.com>
@ 2021-01-15 10:28 ` Yumei Huang
2021-01-15 11:39 ` Brian Foster
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Yumei Huang @ 2021-01-15 10:28 UTC (permalink / raw)
To: linux-xfs; +Cc: david, sandeen, bfoster
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>
---
fs/xfs/xfs_iops.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/xfs/xfs_iops.c b/fs/xfs/xfs_iops.c
index 67c8dc9..f1e21b6 100644
--- a/fs/xfs/xfs_iops.c
+++ b/fs/xfs/xfs_iops.c
@@ -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;
--
1.8.3.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] xfs: Fix assert failure in xfs_setattr_size()
2021-01-15 10:28 ` [PATCH] xfs: Fix assert failure in xfs_setattr_size() Yumei Huang
@ 2021-01-15 11:39 ` Brian Foster
2021-01-20 18:53 ` Christoph Hellwig
2021-01-20 19:27 ` Darrick J. Wong
2 siblings, 0 replies; 4+ messages in thread
From: Brian Foster @ 2021-01-15 11:39 UTC (permalink / raw)
To: Yumei Huang; +Cc: linux-xfs, david, sandeen
On Fri, Jan 15, 2021 at 05:28:55AM -0500, Yumei Huang wrote:
> 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>
> ---
LGTM. Thanks for the patch.
Reviewed-by: Brian Foster <bfoster@redhat.com>
> fs/xfs/xfs_iops.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/fs/xfs/xfs_iops.c b/fs/xfs/xfs_iops.c
> index 67c8dc9..f1e21b6 100644
> --- a/fs/xfs/xfs_iops.c
> +++ b/fs/xfs/xfs_iops.c
> @@ -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;
> --
> 1.8.3.1
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] xfs: Fix assert failure in xfs_setattr_size()
2021-01-15 10:28 ` [PATCH] xfs: Fix assert failure in xfs_setattr_size() Yumei Huang
2021-01-15 11:39 ` Brian Foster
@ 2021-01-20 18:53 ` Christoph Hellwig
2021-01-20 19:27 ` Darrick J. Wong
2 siblings, 0 replies; 4+ messages in thread
From: Christoph Hellwig @ 2021-01-20 18:53 UTC (permalink / raw)
To: Yumei Huang; +Cc: linux-xfs, david, sandeen, bfoster
On Fri, Jan 15, 2021 at 05:28:55AM -0500, Yumei Huang wrote:
> 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>
Looks good,
Reviewed-by: Christoph Hellwig <hch@lst.de>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] xfs: Fix assert failure in xfs_setattr_size()
2021-01-15 10:28 ` [PATCH] xfs: Fix assert failure in xfs_setattr_size() Yumei Huang
2021-01-15 11:39 ` Brian Foster
2021-01-20 18:53 ` Christoph Hellwig
@ 2021-01-20 19:27 ` Darrick J. Wong
2 siblings, 0 replies; 4+ messages in thread
From: Darrick J. Wong @ 2021-01-20 19:27 UTC (permalink / raw)
To: Yumei Huang; +Cc: linux-xfs, david, sandeen, bfoster
On Fri, Jan 15, 2021 at 05:28:55AM -0500, Yumei Huang wrote:
> 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>
Looks ok,
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
--D
> ---
> fs/xfs/xfs_iops.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/fs/xfs/xfs_iops.c b/fs/xfs/xfs_iops.c
> index 67c8dc9..f1e21b6 100644
> --- a/fs/xfs/xfs_iops.c
> +++ b/fs/xfs/xfs_iops.c
> @@ -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;
> --
> 1.8.3.1
>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2021-01-20 19:28 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <316142100.64829455.1610706461022.JavaMail.zimbra@redhat.com>
2021-01-15 10:28 ` [PATCH] xfs: Fix assert failure in xfs_setattr_size() Yumei Huang
2021-01-15 11:39 ` Brian Foster
2021-01-20 18:53 ` Christoph Hellwig
2021-01-20 19:27 ` Darrick J. Wong
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox