[linux] 03/04: ext4: fix fencepost in s_first_meta_bg validation (regression in 3.16.41)

debian-kernel at lists.debian.org debian-kernel at lists.debian.org
Sun Apr 2 01:34:15 UTC 2017


This is an automated email from the git hooks/post-receive script.

benh pushed a commit to branch jessie
in repository linux.

commit 770f0e4c2b6caef5f1f2367bd6f1cabf87c5dfc0
Author: Ben Hutchings <ben at decadent.org.uk>
Date:   Sun Apr 2 02:17:27 2017 +0100

    ext4: fix fencepost in s_first_meta_bg validation (regression in 3.16.41)
---
 debian/changelog                                   |  1 +
 ...x-fencepost-in-s_first_meta_bg-validation.patch | 30 ++++++++++++++++++++++
 debian/patches/series                              |  1 +
 3 files changed, 32 insertions(+)

diff --git a/debian/changelog b/debian/changelog
index b024001..2a58490 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -566,6 +566,7 @@ linux (3.16.42-1) UNRELEASED; urgency=medium
   * net: Avoid ABI change for "net: fix sk_mem_reclaim_partial()"
   * vfs: Avoid ABI change for "mnt: Add a per mount namespace limit ..."
   * mmc: Avoid ABI change for "mmc: core: Annotate cmd_hdr as __le32"
+  * ext4: fix fencepost in s_first_meta_bg validation (regression in 3.16.41)
 
   [ Salvatore Bonaccorso ]
   * sunrpc: fix refcounting problems with auth_gss messages.
diff --git a/debian/patches/bugfix/all/ext4-fix-fencepost-in-s_first_meta_bg-validation.patch b/debian/patches/bugfix/all/ext4-fix-fencepost-in-s_first_meta_bg-validation.patch
new file mode 100644
index 0000000..dd34e28
--- /dev/null
+++ b/debian/patches/bugfix/all/ext4-fix-fencepost-in-s_first_meta_bg-validation.patch
@@ -0,0 +1,30 @@
+From: Theodore Ts'o <tytso at mit.edu>
+Date: Wed, 15 Feb 2017 01:26:39 -0500
+Subject: ext4: fix fencepost in s_first_meta_bg validation
+Origin: https://git.kernel.org/linus/2ba3e6e8afc9b6188b471f27cf2b5e3cf34e7af2
+
+It is OK for s_first_meta_bg to be equal to the number of block group
+descriptor blocks.  (It rarely happens, but it shouldn't cause any
+problems.)
+
+https://bugzilla.kernel.org/show_bug.cgi?id=194567
+
+Fixes: 3a4b77cd47bb837b8557595ec7425f281f2ca1fe
+Signed-off-by: Theodore Ts'o <tytso at mit.edu>
+Cc: stable at vger.kernel.org
+[bwh: Backported to 3.16: adjust context]
+---
+ fs/ext4/super.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/fs/ext4/super.c
++++ b/fs/ext4/super.c
+@@ -3914,7 +3914,7 @@ static int ext4_fill_super(struct super_
+ 	db_count = (sbi->s_groups_count + EXT4_DESC_PER_BLOCK(sb) - 1) /
+ 		   EXT4_DESC_PER_BLOCK(sb);
+ 	if (EXT4_HAS_INCOMPAT_FEATURE(sb,EXT4_FEATURE_INCOMPAT_META_BG)) {
+-		if (le32_to_cpu(es->s_first_meta_bg) >= db_count) {
++		if (le32_to_cpu(es->s_first_meta_bg) > db_count) {
+ 			ext4_msg(sb, KERN_WARNING,
+ 				 "first meta block group too large: %u "
+ 				 "(group descriptor block count %u)",
diff --git a/debian/patches/series b/debian/patches/series
index 5af4a72..b6ae870 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -244,6 +244,7 @@ bugfix/all/ecryptfs-fix-handling-of-directory-opening.patch
 bugfix/all/-xen-blkfront-fix-accounting-of-reqs-when-migrating.patch
 bugfix/all/locking-mutex-don-t-assume-task_running.patch
 bugfix/all/SUNRPC-fix-refcounting-problems-with-auth_gss-messag.patch
+bugfix/all/ext4-fix-fencepost-in-s_first_meta_bg-validation.patch
 
 # memfd_create() & kdbus backport
 features/all/kdbus/mm-allow-drivers-to-prevent-new-writable-mappings.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/kernel/linux.git



More information about the Kernel-svn-changes mailing list