diff options
author | Theodore Ts'o <tytso@mit.edu> | 2019-11-08 21:53:42 -0500 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2019-11-09 01:55:14 -0500 |
commit | 2faf75d24161a7d2d682985812bb9f8f2faea323 (patch) | |
tree | 7ac83159e855294d920dfa32245b510147405c7e /e2fsck/journal.c | |
parent | a8833696e84db27c34a231d83fdc86871217208d (diff) | |
download | e2fsprogs-2faf75d24161a7d2d682985812bb9f8f2faea323.tar.gz |
Sync kernel's fix for potential double free in jbd2
Commit 0d52154bb0a7 ("jbd2: fix potential double free") changes the
interface exported by revoke.c to initialize and destroy the slab
caches. Make the necessary changes to the code in e2fsck and debugfs
which calls revoke.c
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Diffstat (limited to 'e2fsck/journal.c')
-rw-r--r-- | e2fsck/journal.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/e2fsck/journal.c b/e2fsck/journal.c index 3ab151b2..9a0ced5c 100644 --- a/e2fsck/journal.c +++ b/e2fsck/journal.c @@ -929,7 +929,14 @@ static errcode_t recover_ext3_journal(e2fsck_t ctx) clear_problem_context(&pctx); - jbd2_journal_init_revoke_caches(); + retval = jbd2_journal_init_revoke_record_cache(); + if (retval) + return retval; + + retval = jbd2_journal_init_revoke_table_cache(); + if (retval) + return retval; + retval = e2fsck_get_journal(ctx, &journal); if (retval) return retval; @@ -957,7 +964,8 @@ static errcode_t recover_ext3_journal(e2fsck_t ctx) errout: jbd2_journal_destroy_revoke(journal); - jbd2_journal_destroy_revoke_caches(); + jbd2_journal_destroy_revoke_record_cache(); + jbd2_journal_destroy_revoke_table_cache(); e2fsck_journal_release(ctx, journal, 1, 0); return retval; } |