All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chris Mason <clm@fb.com>
To: Mark Fasheh <mfasheh@suse.de>
Cc: <linux-btrfs@vger.kernel.org>, Filipe Manana <fdmanana@suse.com>
Subject: Re: [PATCH] btrfs: fix use after free iterating extrefs
Date: Tue, 13 Oct 2015 22:41:10 -0400	[thread overview]
Message-ID: <20151014024110.GF4890@ret.masoncoding.com> (raw)
In-Reply-To: <20151013191755.GG1044@wotan.suse.de>

On Tue, Oct 13, 2015 at 12:17:55PM -0700, Mark Fasheh wrote:
> On Tue, Oct 13, 2015 at 02:06:48PM -0400, Chris Mason wrote:
> > The code for btrfs inode-resolve has never worked properly for
> > files with enough hard links to trigger extrefs.  It was trying to
> > get the leaf out of a path after freeing the path:
> > 
> > 	btrfs_release_path(path);
> > 	leaf = path->nodes[0];
> > 	item_size = btrfs_item_size_nr(leaf, slot);
> > 
> > The fix here is to use the extent buffer we cloned just a little higher
> > up to avoid deadlocks caused by using the leaf in the path.
> > 
> > Signed-off-by: Chris Mason <clm@fb.com>
> > cc: stable@vger.kernel.org # v3.7+
> > cc: Mark Fasheh <mfasheh@suse.de>
> Reviewed-by: Mark Fasheh <mfasheh@suse.de>

Thanks Mark and Filipe, I've tested this and queued it up.

-chris

      reply	other threads:[~2015-10-14  2:41 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-13 18:06 [PATCH] btrfs: fix use after free iterating extrefs Chris Mason
2015-10-13 18:50 ` Filipe Manana
2015-10-13 19:17 ` Mark Fasheh
2015-10-14  2:41   ` Chris Mason [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=20151014024110.GF4890@ret.masoncoding.com \
    --to=clm@fb.com \
    --cc=fdmanana@suse.com \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=mfasheh@suse.de \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.