From: Mark Fasheh <mfasheh@suse.de>
To: Chris Mason <clm@fb.com>,
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 12:17:55 -0700 [thread overview]
Message-ID: <20151013191755.GG1044@wotan.suse.de> (raw)
In-Reply-To: <20151013180648.GC4890@ret.masoncoding.com>
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 for the CC Chris.
--Mark
--
Mark Fasheh
next prev parent reply other threads:[~2015-10-13 19:17 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 [this message]
2015-10-14 2:41 ` Chris Mason
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=20151013191755.GG1044@wotan.suse.de \
--to=mfasheh@suse.de \
--cc=clm@fb.com \
--cc=fdmanana@suse.com \
--cc=linux-btrfs@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).