From: Theodore Ts'o Date: Tue, 6 Nov 2018 22:18:17 +0000 (-0500) Subject: ext4: avoid possible double brelse() in add_new_gdb() on error path X-Git-Tag: v3.18.126~12 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=eebf0feb5ddb603025da7c1c6ab40c590b08c529;p=profile%2Fwearable%2Fplatform%2Fkernel%2Flinux-3.18-exynos7270.git 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 Signed-off-by: Theodore Ts'o Cc: stable@kernel.org # 2.6.38 Signed-off-by: Greg Kroah-Hartman --- diff --git a/fs/ext4/resize.c b/fs/ext4/resize.c index f5c54f4..089fe84 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);