diff options
author | Jan Kara <jack@suse.cz> | 2013-08-12 09:53:28 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-08-20 08:26:29 -0700 |
commit | 9cfae3e2f1cac477673d211e9f6a06248dda5b8a (patch) | |
tree | 4be6e3db7afc25c23639121407c7fb4087da301d /Documentation/kobject.txt | |
parent | dadf2af13293d83259645efeda3d84634bce2afb (diff) |
jbd2: Fix use after free after error in jbd2_journal_dirty_metadata()
commit 91aa11fae1cf8c2fd67be0609692ea9741cdcc43 upstream.
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>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'Documentation/kobject.txt')
0 files changed, 0 insertions, 0 deletions