public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Dave Chinner <david@fromorbit.com>
To: linux-xfs@vger.kernel.org
Subject: [PATCH 0/2] xfs: handle inode extent count mismatch
Date: Tue, 19 Jun 2018 12:41:26 +1000	[thread overview]
Message-ID: <20180619024128.22669-1-david@fromorbit.com> (raw)

Hi folks,

Wen Xu provided an image that caused a crash allocating an extent.
The AGFL was corrupt, as was the inode data fork extent count. The
combination of the two corruptions could lead to a delalloc extent
being allocated on write, and then when allocation fails because the
AGFL was corrupt, it would try to punch out the delalloc extent
which would then try to convert the format of the extent list in the
inode data fork without a transaction. This would crash.

The following two patches address this - the first makes
xfs_bunmapi() return EFSCORRUPTED if it tries to change the inode
fork format without a transaction context and avoids the crash. THe
second makes the inode verifier detect this specific inode fork
corruption and prevents any attempt to access it with EFSCORRUPTED.

Comments?

Cheers,

Dave.


             reply	other threads:[~2018-06-19  2:41 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-19  2:41 Dave Chinner [this message]
2018-06-19  2:41 ` [PATCH 1/2] xfs: transactionless xfs_bunmapi shouldn't do format conversion Dave Chinner
2018-06-19  4:54   ` Darrick J. Wong
2018-06-19  5:27     ` Dave Chinner
2018-06-19  6:06       ` Darrick J. Wong
2018-06-19 23:33         ` Dave Chinner
2018-06-21 16:42           ` Darrick J. Wong
2018-06-20  7:31     ` Christoph Hellwig
2018-06-21 22:34       ` Dave Chinner
2018-06-21 22:55         ` Darrick J. Wong
2018-06-21 23:23           ` Dave Chinner
2018-06-19  2:41 ` [PATCH 2/2] xfs: More robust inode extent count validation Dave Chinner
2018-06-19  4:57   ` Darrick J. Wong
2018-06-19  5:29     ` Dave Chinner
2018-06-19  6:07       ` Darrick J. Wong
2018-06-20  7:34   ` Christoph Hellwig

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=20180619024128.22669-1-david@fromorbit.com \
    --to=david@fromorbit.com \
    --cc=linux-xfs@vger.kernel.org \
    /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