diff options
author | Theodore Ts'o <tytso@mit.edu> | 2018-11-07 01:18:17 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-11-22 09:32:48 +0300 |
commit | eebf0feb5ddb603025da7c1c6ab40c590b08c529 (patch) | |
tree | 623b4ce04a78e7c163ab98570ff2ffb59bb05849 /fs/ext4/resize.c | |
parent | e66a1ebd80b1922312ff9bb315d8263285f38e8d (diff) | |
download | linux-eebf0feb5ddb603025da7c1c6ab40c590b08c529.tar.xz |
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>
Diffstat (limited to 'fs/ext4/resize.c')
-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 f5c54f43949d..089fe8469bbc 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); |