From: Theodore Ts'o <tytso@mit.edu>
To: Jan Kara <jack@suse.cz>
Cc: Sage Weil <sage@inktank.com>, linux-ext4@vger.kernel.org
Subject: Re: [PATCH] ext4: Fix use after free after error in jbd2_journal_dirty_metadata()
Date: Mon, 12 Aug 2013 09:56:15 -0400 [thread overview]
Message-ID: <20130812135615.GA28183@thunk.org> (raw)
In-Reply-To: <1376314744-17678-1-git-send-email-jack@suse.cz>
On Mon, Aug 12, 2013 at 03:39:04PM +0200, Jan Kara wrote:
> When jbd2_journal_dirty_metadata() returns error,
> __ext4_handle_dirty_metadata() stops the handle. However callers of this
> function do not count with that fact and still happily used now freed
> handle. This use after free can result in various issues but very likely
> we oops soon.
>
> The motivation of adding __ext4_journal_stop() into
> __ext4_handle_dirty_metadata() in commit 9ea7a0df seems to be only to
> improve error reporting. So replace __ext4_journal_stop() with
> ext4_journal_abort_handle() which was there before that commit and add
> WARN_ON_ONCE() to dump stack to provide useful information.
>
> Reported-by: Sage Weil <sage@inktank.com>
> Signed-off-by: Jan Kara <jack@suse.cz>
Applied, thanks.
- Ted
prev parent reply other threads:[~2013-08-12 13:56 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-12 13:39 [PATCH] ext4: Fix use after free after error in jbd2_journal_dirty_metadata() Jan Kara
2013-08-12 13:56 ` 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=20130812135615.GA28183@thunk.org \
--to=tytso@mit.edu \
--cc=jack@suse.cz \
--cc=linux-ext4@vger.kernel.org \
--cc=sage@inktank.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;
as well as URLs for NNTP newsgroup(s).