From: Theodore Ts'o <tytso@mit.edu>
To: Andreas Dilger <adilger@dilger.ca>
Cc: Eric Sandeen <sandeen@redhat.com>,
"linux-ext4@vger.kernel.org" <linux-ext4@vger.kernel.org>,
shuwang@redhat.com
Subject: Re: [PATCH] ext4: fix mmp use after free during unmount
Date: Sat, 26 Nov 2016 14:31:07 -0500 [thread overview]
Message-ID: <20161126193107.yy4fmkiliqeyz7uy@thunk.org> (raw)
In-Reply-To: <B4E24389-6BE1-4896-B426-EB60172133E3@dilger.ca>
On Thu, Oct 20, 2016 at 02:26:38PM -0600, Andreas Dilger wrote:
> On Oct 20, 2016, at 12:19 PM, Eric Sandeen <sandeen@redhat.com> wrote:
> >
> > In ext4_put_super, we call brelse on the buffer head containing
> > the ext4 superblock, but then try to use it when we stop the
> > mmp thread, because when the thread shuts down it does:
> >
> > write_mmp_block
> > ext4_mmp_csum_set
> > ext4_has_metadata_csum
> > WARN_ON_ONCE(ext4_has_feature_metadata_csum(sb)...)
> >
> > which reaches into sb->s_fs_info->s_es->s_feature_ro_compat,
> > which lives in the superblock buffer s_sbh which we just released.
> >
> > Fix this by moving the brelse down to a point where we are no
> > longer using it.
> >
> > Reported-by: Wang Shu <shuwang@redhat.com>
> > Signed-off-by: Eric Sandeen <sandeen@redhat.com>
>
> Reviewed-by: Andreas Dilger <adilger@dilger.ca>
Applied, thanks.
- Ted
prev parent reply other threads:[~2016-11-26 19:31 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-10-20 18:19 [PATCH] ext4: fix mmp use after free during unmount Eric Sandeen
2016-10-20 20:26 ` Andreas Dilger
2016-11-26 19:31 ` Theodore Ts'o [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=20161126193107.yy4fmkiliqeyz7uy@thunk.org \
--to=tytso@mit.edu \
--cc=adilger@dilger.ca \
--cc=linux-ext4@vger.kernel.org \
--cc=sandeen@redhat.com \
--cc=shuwang@redhat.com \
/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