Home Home > GIT Browse > openSUSE-15.0
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Kara <jack@suse.cz>2018-12-07 12:25:28 +0100
committerJan Kara <jack@suse.cz>2018-12-07 16:30:43 +0100
commitd45f182c86d046a86d930ca6c0db320ec5427068 (patch)
tree8e22475b8f9fec8294226e2b44fc630ec0fcc37b
parenta2c856b204bc92ea7a2d143fd99e62f826275f5d (diff)
ext4: avoid possible double brelse() in add_new_gdb() on error
path (bsc#1118760).
-rw-r--r--patches.fixes/ext4-avoid-possible-double-brelse-in-add_new_gdb-on-.patch34
-rw-r--r--series.conf1
2 files changed, 35 insertions, 0 deletions
diff --git a/patches.fixes/ext4-avoid-possible-double-brelse-in-add_new_gdb-on-.patch b/patches.fixes/ext4-avoid-possible-double-brelse-in-add_new_gdb-on-.patch
new file mode 100644
index 0000000000..b6969094c7
--- /dev/null
+++ b/patches.fixes/ext4-avoid-possible-double-brelse-in-add_new_gdb-on-.patch
@@ -0,0 +1,34 @@
+From 4f32c38b4662312dd3c5f113d8bdd459887fb773 Mon Sep 17 00:00:00 2001
+From: Theodore Ts'o <tytso@mit.edu>
+Date: Tue, 6 Nov 2018 17:18:17 -0500
+Subject: [PATCH] ext4: avoid possible double brelse() in add_new_gdb() on
+ error path
+Git-commit: 4f32c38b4662312dd3c5f113d8bdd459887fb773
+Patch-mainline: v4.20-rc2
+References: bsc#1118760
+
+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
+Acked-by: Jan Kara <jack@suse.cz>
+
+---
+ fs/ext4/resize.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/fs/ext4/resize.c b/fs/ext4/resize.c
+index 85158e9de7c2..a5efee34415f 100644
+--- a/fs/ext4/resize.c
++++ b/fs/ext4/resize.c
+@@ -871,6 +871,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);
+--
+2.16.4
+
diff --git a/series.conf b/series.conf
index 3c8925019a..c836ac9f48 100644
--- a/series.conf
+++ b/series.conf
@@ -18930,6 +18930,7 @@
patches.fixes/ext4-fix-possible-inode-leak-in-the-retry-loop-of-ex.patch
patches.fixes/ext4-avoid-buffer-leak-on-shutdown-in-ext4_mark_iloc.patch
patches.fixes/ext4-avoid-buffer-leak-in-ext4_orphan_add-after-prio.patch
+ patches.fixes/ext4-avoid-possible-double-brelse-in-add_new_gdb-on-.patch
patches.fixes/ext4-fix-possible-leak-of-sbi-s_group_desc_leak-in-e.patch
patches.fixes/ext4-fix-possible-leak-of-s_journal_flag_rwsem-in-er.patch
patches.fixes/ext4-release-bs.bh-before-re-using-in-ext4_xattr_blo.patch