public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Yumei Huang <yuhuang@redhat.com>
To: linux-xfs@vger.kernel.org
Cc: david@fromorbit.com, sandeen@sandeen.net, bfoster@redhat.com
Subject: [PATCH] xfs: Fix assert failure in xfs_setattr_size()
Date: Fri, 15 Jan 2021 05:28:55 -0500 (EST)	[thread overview]
Message-ID: <1492355130.64829487.1610706535069.JavaMail.zimbra@redhat.com> (raw)
In-Reply-To: <316142100.64829455.1610706461022.JavaMail.zimbra@redhat.com>

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


       reply	other threads:[~2021-01-15 10:30 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <316142100.64829455.1610706461022.JavaMail.zimbra@redhat.com>
2021-01-15 10:28 ` Yumei Huang [this message]
2021-01-15 11:39   ` [PATCH] xfs: Fix assert failure in xfs_setattr_size() Brian Foster
2021-01-20 18:53   ` Christoph Hellwig
2021-01-20 19:27   ` Darrick J. Wong

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1492355130.64829487.1610706535069.JavaMail.zimbra@redhat.com \
    --to=yuhuang@redhat.com \
    --cc=bfoster@redhat.com \
    --cc=david@fromorbit.com \
    --cc=linux-xfs@vger.kernel.org \
    --cc=sandeen@sandeen.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox