]> git.proxmox.com Git - mirror_ubuntu-disco-kernel.git/commit
jbd2: fix potential double free
authorChengguang Xu <cgxu519@gmail.com>
Sat, 11 May 2019 01:15:47 +0000 (21:15 -0400)
committerStefan Bader <stefan.bader@canonical.com>
Tue, 30 Jul 2019 10:58:17 +0000 (12:58 +0200)
commit9b973d6038c1400ef3ad8e52146261de23cbcc92
tree847be015199fe8c9cb598b1106023e8b36b61fa4
parent0bb227ccb27e102406941985ddef0ee29a23b279
jbd2: fix potential double free

BugLink: https://bugs.launchpad.net/bugs/1836614
commit 0d52154bb0a700abb459a2cbce0a30fc2549b67e upstream.

When failing from creating cache jbd2_inode_cache, we will destroy the
previously created cache jbd2_handle_cache twice.  This patch fixes
this by moving each cache initialization/destruction to its own
separate, individual function.

Signed-off-by: Chengguang Xu <cgxu519@gmail.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Cc: stable@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
Signed-off-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
fs/jbd2/journal.c
fs/jbd2/revoke.c
fs/jbd2/transaction.c
include/linux/jbd2.h