diff options
author | Theodore Ts'o <tytso@mit.edu> | 2018-11-06 17:18:17 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-11-21 09:27:43 +0100 |
commit | 6371a05a1580651c8cd21bb1e49c4985f702c63d (patch) | |
tree | 7cfa707d4b6e75b0dc1c89326c4492bb4671706f | |
parent | 7f168837b121b47de9ce22201293819d65f5d6ac (diff) | |
download | linux-stable-6371a05a1580651c8cd21bb1e49c4985f702c63d.tar.gz linux-stable-6371a05a1580651c8cd21bb1e49c4985f702c63d.tar.bz2 linux-stable-6371a05a1580651c8cd21bb1e49c4985f702c63d.zip |
ext4: avoid possible double brelse() in add_new_gdb() on error path
commit 4f32c38b4662312dd3c5f113d8bdd459887fb773 upstream.
Fixes: b40971426a83 ("ext4: add error checking to calls to ...")
Reported-by: Vasily Averin <vvs@virtuozzo.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Cc: stable@kernel.org # 2.6.38
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | fs/ext4/resize.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/ext4/resize.c b/fs/ext4/resize.c index 82df738e5403..bad13f049fb0 100644 --- a/fs/ext4/resize.c +++ b/fs/ext4/resize.c @@ -844,6 +844,7 @@ static int add_new_gdb(handle_t *handle, struct inode *inode, err = ext4_handle_dirty_metadata(handle, NULL, gdb_bh); if (unlikely(err)) { ext4_std_error(sb, err); + iloc.bh = NULL; goto exit_inode; } brelse(dind); |