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: linux-xfs@vger.kernel.org
Subject: Re: [PATCH] xfs: fix error handling in  xfs_bmap_extents_to_btree
Date: Mon, 1 Oct 2018 08:09:15 +1000	[thread overview]
Message-ID: <20180930220915.GL31060@dastard> (raw)
In-Reply-To: <20180930153444.GA5872@magnolia>

On Sun, Sep 30, 2018 at 08:34:44AM -0700, Darrick J. Wong wrote:
> On Sun, Sep 30, 2018 at 04:18:07PM +1000, Dave Chinner wrote:
> > From: Dave Chinner <dchinner@redhat.com>
> > 
> > Commit 01239d77b9dd ("xfs: fix a null pointer dereference in
> > xfs_bmap_extents_to_btree") attempted to fix a null pointer
> > dreference when a fuzzing corruption of some kind was found.
> > This fix was flawed, resulting in assert failures like:
.....
> > @@ -732,9 +732,10 @@ xfs_bmap_extents_to_btree(
> >  	xfs_trans_mod_dquot_byino(tp, ip, XFS_TRANS_DQ_BCOUNT, 1L);
> >  	abp = xfs_btree_get_bufl(mp, tp, args.fsbno, 0);
> >  	if (!abp) {
> 
> This reminds me to ask, has anyone made progress converting the
> {get,read}_buf functions (and associated callers) to return error codes?

Not me. I had a brief thought about this when looking at this,
but I think we really need to start from the bottom up (i.e. from
the xfs_buf_* functions first) before moving to the higher level
code.

> (I wasn't expecting that as a part of this fix; I'm simply recollecting
> my marbles.)
> 
> Anyway, this looks ok to me.
> 
> Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>

Thanks Darrick, I'll add it to the fixes branch (it's been on top of
the merged tree I've been testing over the weekend) and get it out.

Cheers,

Dave.
-- 
Dave Chinner
david@fromorbit.com

      reply	other threads:[~2018-10-01  4:44 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-30  6:18 [PATCH] xfs: fix error handling in xfs_bmap_extents_to_btree Dave Chinner
2018-09-30 15:34 ` Darrick J. Wong
2018-09-30 22:09   ` 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=20180930220915.GL31060@dastard \
    --to=david@fromorbit.com \
    --cc=darrick.wong@oracle.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;
as well as URLs for NNTP newsgroup(s).