linux-xfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dave Chinner <david@fromorbit.com>
To: "Darrick J. Wong" <darrick.wong@oracle.com>
Cc: "Xu, Wen" <wen.xu@gatech.edu>,
	"linux-xfs@vger.kernel.org" <linux-xfs@vger.kernel.org>
Subject: Re: Kernel crashes in xfs_alloc_get_freelist() when writing to a corrupted xfs image
Date: Mon, 13 Aug 2018 12:29:06 +1000	[thread overview]
Message-ID: <20180813022906.GA31495@dastard> (raw)
In-Reply-To: <20180811000914.GA11750@magnolia>

On Fri, Aug 10, 2018 at 05:09:14PM -0700, Darrick J. Wong wrote:
> On Mon, Jun 18, 2018 at 08:06:37PM +0000, Xu, Wen wrote:
> > Hi,
> > 
> > Here is an issue triggered in xfs_alloc_get_freelist() when writing a corrupted v5 image.
> 
> Just out of curiosity, can you still reproduce this?  I tried just now
> on 4.19 for-next and couldn't get the kernel to crash.

This was the "discard delalloc extent and try to do an extent
conversion with a transaction in xfs_bunmapi()" problem that was
fixed in the middle of the bufferhead removal patch series.

> > [  930.655513] BUG: KASAN: null-ptr-deref in xfs_alloc_get_freelist+0x115/0x350
> > [  930.658644]  dump_stack+0x7b/0xb5
> > [  930.658653]  kasan_report+0x10c/0x390
> > [  930.658663]  __asan_load8+0x54/0x90
> > [  930.658668]  xfs_alloc_get_freelist+0x115/0x350
> > [  930.658689]  xfs_alloc_fix_freelist+0x35b/0x830
> > [  930.658740]  xfs_alloc_vextent+0x215/0x990
> > [  930.658746]  xfs_bmap_extents_to_btree+0x30d/0x940
> > [  930.658775]  __xfs_bunmapi+0x11d5/0x1430
> > [  930.658837]  xfs_bunmapi+0x2c/0x60
> > [  930.658844]  xfs_bmap_punch_delalloc_range+0x170/0x240
> > [  930.658876]  xfs_aops_discard_page+0x178/0x1d0
> > [  930.658881]  xfs_do_writepage+0x90c/0x9d0
> > [  930.658916]  write_cache_pages+0x3cd/0x770

i.e. this error path no longer calls xfs_bunmapi().

Cheers,

Dave.
-- 
Dave Chinner
david@fromorbit.com

      reply	other threads:[~2018-08-13  5:09 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-18 20:06 Kernel crashes in xfs_alloc_get_freelist() when writing to a corrupted xfs image Xu, Wen
2018-08-11  0:09 ` Darrick J. Wong
2018-08-13  2:29   ` Dave Chinner [this message]

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=20180813022906.GA31495@dastard \
    --to=david@fromorbit.com \
    --cc=darrick.wong@oracle.com \
    --cc=linux-xfs@vger.kernel.org \
    --cc=wen.xu@gatech.edu \
    /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;
as well as URLs for NNTP newsgroup(s).