]> git.baikalelectronics.ru Git - kernel.git/commit
jbd2: fix potential double free
authorChengguang Xu <cgxu519@gmail.com>
Sat, 11 May 2019 01:15:47 +0000 (21:15 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Sat, 11 May 2019 01:15:47 +0000 (21:15 -0400)
commit10b2eba68761b1952a2b76333e346056f3bdd9b2
tree77f16584704ea8a684a8f0bd70bc76bfd557e9a9
parent75c0fa1abe33584a9f2eff04618ac1df38bcf3a9
jbd2: fix potential double free

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
fs/jbd2/journal.c
fs/jbd2/revoke.c
fs/jbd2/transaction.c
include/linux/jbd2.h