]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
drop 1 ext4 patch from 5.1, 5.0, and 4.19
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 21 May 2019 16:47:43 +0000 (18:47 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 21 May 2019 16:47:43 +0000 (18:47 +0200)
This causes 2 other patches to be dropped as well, and some refreshed.

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
16 files changed:
queue-4.19/ext4-don-t-update-s_rev_level-if-not-required.patch
queue-4.19/ext4-fix-block-validity-checks-for-journal-inodes-using-indirect-blocks.patch [deleted file]
queue-4.19/ext4-fix-compile-error-when-using-buffer_trace.patch
queue-4.19/ext4-protect-journal-inode-s-blocks-using-block_validity.patch [deleted file]
queue-4.19/ext4-unsigned-int-compared-against-zero.patch [deleted file]
queue-4.19/series
queue-5.0/ext4-don-t-update-s_rev_level-if-not-required.patch
queue-5.0/ext4-fix-block-validity-checks-for-journal-inodes-using-indirect-blocks.patch [deleted file]
queue-5.0/ext4-fix-compile-error-when-using-buffer_trace.patch
queue-5.0/ext4-protect-journal-inode-s-blocks-using-block_validity.patch [deleted file]
queue-5.0/ext4-unsigned-int-compared-against-zero.patch [deleted file]
queue-5.0/series
queue-5.1/ext4-fix-block-validity-checks-for-journal-inodes-using-indirect-blocks.patch [deleted file]
queue-5.1/ext4-protect-journal-inode-s-blocks-using-block_validity.patch [deleted file]
queue-5.1/ext4-unsigned-int-compared-against-zero.patch [deleted file]
queue-5.1/series

index 7ba2cbf7785f9f1ba01454355a20ccf111fe6dd3..e4ede8cf10a67b5c30026f06591162efa20142fc 100644 (file)
@@ -72,7 +72,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  extern int ext4_update_rocompat_feature(handle_t *handle,
 --- a/fs/ext4/inode.c
 +++ b/fs/ext4/inode.c
-@@ -5324,7 +5324,6 @@ static int ext4_do_update_inode(handle_t
+@@ -5320,7 +5320,6 @@ static int ext4_do_update_inode(handle_t
                err = ext4_journal_get_write_access(handle, EXT4_SB(sb)->s_sbh);
                if (err)
                        goto out_brelse;
diff --git a/queue-4.19/ext4-fix-block-validity-checks-for-journal-inodes-using-indirect-blocks.patch b/queue-4.19/ext4-fix-block-validity-checks-for-journal-inodes-using-indirect-blocks.patch
deleted file mode 100644 (file)
index dd17d55..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-From 170417c8c7bb2cbbdd949bf5c443c0c8f24a203b Mon Sep 17 00:00:00 2001
-From: Theodore Ts'o <tytso@mit.edu>
-Date: Wed, 15 May 2019 00:51:19 -0400
-Subject: ext4: fix block validity checks for journal inodes using indirect blocks
-
-From: Theodore Ts'o <tytso@mit.edu>
-
-commit 170417c8c7bb2cbbdd949bf5c443c0c8f24a203b upstream.
-
-Commit 345c0dbf3a30 ("ext4: protect journal inode's blocks using
-block_validity") failed to add an exception for the journal inode in
-ext4_check_blockref(), which is the function used by ext4_get_branch()
-for indirect blocks.  This caused attempts to read from the ext3-style
-journals to fail with:
-
-[  848.968550] EXT4-fs error (device sdb7): ext4_get_branch:171: inode #8: block 30343695: comm jbd2/sdb7-8: invalid block
-
-Fix this by adding the missing exception check.
-
-Fixes: 345c0dbf3a30 ("ext4: protect journal inode's blocks using block_validity")
-Reported-by: Arthur Marsh <arthur.marsh@internode.on.net>
-Signed-off-by: Theodore Ts'o <tytso@mit.edu>
-Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
----
- fs/ext4/block_validity.c |    5 +++++
- 1 file changed, 5 insertions(+)
-
---- a/fs/ext4/block_validity.c
-+++ b/fs/ext4/block_validity.c
-@@ -276,6 +276,11 @@ int ext4_check_blockref(const char *func
-       __le32 *bref = p;
-       unsigned int blk;
-+      if (ext4_has_feature_journal(inode->i_sb) &&
-+          (inode->i_ino ==
-+           le32_to_cpu(EXT4_SB(inode->i_sb)->s_es->s_journal_inum)))
-+              return 0;
-+
-       while (bref < p+max) {
-               blk = le32_to_cpu(*bref++);
-               if (blk &&
index 4b4c9cb43619c66ae805201d4a3d9dbce4e6d144..be4cd1c50fc5de619f4f1124a1cc3581edce6a58 100644 (file)
@@ -28,7 +28,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
 
 --- a/fs/ext4/inode.c
 +++ b/fs/ext4/inode.c
-@@ -5975,7 +5975,7 @@ int ext4_expand_extra_isize(struct inode
+@@ -5971,7 +5971,7 @@ int ext4_expand_extra_isize(struct inode
  
        ext4_write_lock_xattr(inode, &no_expand);
  
diff --git a/queue-4.19/ext4-protect-journal-inode-s-blocks-using-block_validity.patch b/queue-4.19/ext4-protect-journal-inode-s-blocks-using-block_validity.patch
deleted file mode 100644 (file)
index b94fed6..0000000
+++ /dev/null
@@ -1,101 +0,0 @@
-From 345c0dbf3a30872d9b204db96b5857cd00808cae Mon Sep 17 00:00:00 2001
-From: Theodore Ts'o <tytso@mit.edu>
-Date: Tue, 9 Apr 2019 23:37:08 -0400
-Subject: ext4: protect journal inode's blocks using block_validity
-
-From: Theodore Ts'o <tytso@mit.edu>
-
-commit 345c0dbf3a30872d9b204db96b5857cd00808cae upstream.
-
-Add the blocks which belong to the journal inode to block_validity's
-system zone so attempts to deallocate or overwrite the journal due a
-corrupted file system where the journal blocks are also claimed by
-another inode.
-
-Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=202879
-Signed-off-by: Theodore Ts'o <tytso@mit.edu>
-Cc: stable@kernel.org
-Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
----
- fs/ext4/block_validity.c |   48 +++++++++++++++++++++++++++++++++++++++++++++++
- fs/ext4/inode.c          |    4 +++
- 2 files changed, 52 insertions(+)
-
---- a/fs/ext4/block_validity.c
-+++ b/fs/ext4/block_validity.c
-@@ -137,6 +137,48 @@ static void debug_print_tree(struct ext4
-       printk(KERN_CONT "\n");
- }
-+static int ext4_protect_reserved_inode(struct super_block *sb, u32 ino)
-+{
-+      struct inode *inode;
-+      struct ext4_sb_info *sbi = EXT4_SB(sb);
-+      struct ext4_map_blocks map;
-+      u32 i = 0, err = 0, num, n;
-+
-+      if ((ino < EXT4_ROOT_INO) ||
-+          (ino > le32_to_cpu(sbi->s_es->s_inodes_count)))
-+              return -EINVAL;
-+      inode = ext4_iget(sb, ino, EXT4_IGET_SPECIAL);
-+      if (IS_ERR(inode))
-+              return PTR_ERR(inode);
-+      num = (inode->i_size + sb->s_blocksize - 1) >> sb->s_blocksize_bits;
-+      while (i < num) {
-+              map.m_lblk = i;
-+              map.m_len = num - i;
-+              n = ext4_map_blocks(NULL, inode, &map, 0);
-+              if (n < 0) {
-+                      err = n;
-+                      break;
-+              }
-+              if (n == 0) {
-+                      i++;
-+              } else {
-+                      if (!ext4_data_block_valid(sbi, map.m_pblk, n)) {
-+                              ext4_error(sb, "blocks %llu-%llu from inode %u "
-+                                         "overlap system zone", map.m_pblk,
-+                                         map.m_pblk + map.m_len - 1, ino);
-+                              err = -EFSCORRUPTED;
-+                              break;
-+                      }
-+                      err = add_system_zone(sbi, map.m_pblk, n);
-+                      if (err < 0)
-+                              break;
-+                      i += n;
-+              }
-+      }
-+      iput(inode);
-+      return err;
-+}
-+
- int ext4_setup_system_zone(struct super_block *sb)
- {
-       ext4_group_t ngroups = ext4_get_groups_count(sb);
-@@ -171,6 +213,12 @@ int ext4_setup_system_zone(struct super_
-               if (ret)
-                       return ret;
-       }
-+      if (ext4_has_feature_journal(sb) && sbi->s_es->s_journal_inum) {
-+              ret = ext4_protect_reserved_inode(sb,
-+                              le32_to_cpu(sbi->s_es->s_journal_inum));
-+              if (ret)
-+                      return ret;
-+      }
-       if (test_opt(sb, DEBUG))
-               debug_print_tree(sbi);
---- a/fs/ext4/inode.c
-+++ b/fs/ext4/inode.c
-@@ -399,6 +399,10 @@ static int __check_block_validity(struct
-                               unsigned int line,
-                               struct ext4_map_blocks *map)
- {
-+      if (ext4_has_feature_journal(inode->i_sb) &&
-+          (inode->i_ino ==
-+           le32_to_cpu(EXT4_SB(inode->i_sb)->s_es->s_journal_inum)))
-+              return 0;
-       if (!ext4_data_block_valid(EXT4_SB(inode->i_sb), map->m_pblk,
-                                  map->m_len)) {
-               ext4_error_inode(inode, func, line, map->m_pblk,
diff --git a/queue-4.19/ext4-unsigned-int-compared-against-zero.patch b/queue-4.19/ext4-unsigned-int-compared-against-zero.patch
deleted file mode 100644 (file)
index 85dc8e9..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-From fbbbbd2f28aec991f3fbc248df211550fbdfd58c Mon Sep 17 00:00:00 2001
-From: Colin Ian King <colin.king@canonical.com>
-Date: Fri, 10 May 2019 22:06:38 -0400
-Subject: ext4: unsigned int compared against zero
-
-From: Colin Ian King <colin.king@canonical.com>
-
-commit fbbbbd2f28aec991f3fbc248df211550fbdfd58c upstream.
-
-There are two cases where u32 variables n and err are being checked
-for less than zero error values, the checks is always false because
-the variables are not signed. Fix this by making the variables ints.
-
-Addresses-Coverity: ("Unsigned compared against 0")
-Fixes: 345c0dbf3a30 ("ext4: protect journal inode's blocks using block_validity")
-Signed-off-by: Colin Ian King <colin.king@canonical.com>
-Signed-off-by: Theodore Ts'o <tytso@mit.edu>
-Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
----
- fs/ext4/block_validity.c |    3 ++-
- 1 file changed, 2 insertions(+), 1 deletion(-)
-
---- a/fs/ext4/block_validity.c
-+++ b/fs/ext4/block_validity.c
-@@ -142,7 +142,8 @@ static int ext4_protect_reserved_inode(s
-       struct inode *inode;
-       struct ext4_sb_info *sbi = EXT4_SB(sb);
-       struct ext4_map_blocks map;
--      u32 i = 0, err = 0, num, n;
-+      u32 i = 0, num;
-+      int err = 0, n;
-       if ((ino < EXT4_ROOT_INO) ||
-           (ino > le32_to_cpu(sbi->s_es->s_inodes_count)))
index 12cfaa2ed12c4399b30e7a331fdc4ed371826f2e..f09f924cd1ad6f70922bf8f4db2a452a56b2432a 100644 (file)
@@ -64,7 +64,6 @@ tty-vt.c-fix-tiocl_blankscreen-console-blanking-if-blankinterval-0.patch
 tty-vt-fix-write-write-race-in-ioctl-kdskbsent-handler.patch
 jbd2-check-superblock-mapped-prior-to-committing.patch
 ext4-make-sanity-check-in-mballoc-more-strict.patch
-ext4-protect-journal-inode-s-blocks-using-block_validity.patch
 ext4-ignore-e_value_offs-for-xattrs-with-value-in-ea-inode.patch
 ext4-avoid-drop-reference-to-iloc.bh-twice.patch
 ext4-fix-use-after-free-race-with-debug_want_extra_isize.patch
@@ -99,7 +98,5 @@ iov_iter-optimize-page_copy_sane.patch
 pstore-centralize-init-exit-routines.patch
 pstore-allocate-compression-during-late_initcall.patch
 pstore-refactor-compression-initialization.patch
-ext4-unsigned-int-compared-against-zero.patch
-ext4-fix-block-validity-checks-for-journal-inodes-using-indirect-blocks.patch
 ext4-fix-compile-error-when-using-buffer_trace.patch
 ext4-don-t-update-s_rev_level-if-not-required.patch
index bc5c7502d182dc229f822252ab9765332f23430f..defd716ebaf30e03fd58a18ac038bfd56dab5f17 100644 (file)
@@ -72,7 +72,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  extern int ext4_update_rocompat_feature(handle_t *handle,
 --- a/fs/ext4/inode.c
 +++ b/fs/ext4/inode.c
-@@ -5355,7 +5355,6 @@ static int ext4_do_update_inode(handle_t
+@@ -5351,7 +5351,6 @@ static int ext4_do_update_inode(handle_t
                err = ext4_journal_get_write_access(handle, EXT4_SB(sb)->s_sbh);
                if (err)
                        goto out_brelse;
diff --git a/queue-5.0/ext4-fix-block-validity-checks-for-journal-inodes-using-indirect-blocks.patch b/queue-5.0/ext4-fix-block-validity-checks-for-journal-inodes-using-indirect-blocks.patch
deleted file mode 100644 (file)
index dd17d55..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-From 170417c8c7bb2cbbdd949bf5c443c0c8f24a203b Mon Sep 17 00:00:00 2001
-From: Theodore Ts'o <tytso@mit.edu>
-Date: Wed, 15 May 2019 00:51:19 -0400
-Subject: ext4: fix block validity checks for journal inodes using indirect blocks
-
-From: Theodore Ts'o <tytso@mit.edu>
-
-commit 170417c8c7bb2cbbdd949bf5c443c0c8f24a203b upstream.
-
-Commit 345c0dbf3a30 ("ext4: protect journal inode's blocks using
-block_validity") failed to add an exception for the journal inode in
-ext4_check_blockref(), which is the function used by ext4_get_branch()
-for indirect blocks.  This caused attempts to read from the ext3-style
-journals to fail with:
-
-[  848.968550] EXT4-fs error (device sdb7): ext4_get_branch:171: inode #8: block 30343695: comm jbd2/sdb7-8: invalid block
-
-Fix this by adding the missing exception check.
-
-Fixes: 345c0dbf3a30 ("ext4: protect journal inode's blocks using block_validity")
-Reported-by: Arthur Marsh <arthur.marsh@internode.on.net>
-Signed-off-by: Theodore Ts'o <tytso@mit.edu>
-Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
----
- fs/ext4/block_validity.c |    5 +++++
- 1 file changed, 5 insertions(+)
-
---- a/fs/ext4/block_validity.c
-+++ b/fs/ext4/block_validity.c
-@@ -276,6 +276,11 @@ int ext4_check_blockref(const char *func
-       __le32 *bref = p;
-       unsigned int blk;
-+      if (ext4_has_feature_journal(inode->i_sb) &&
-+          (inode->i_ino ==
-+           le32_to_cpu(EXT4_SB(inode->i_sb)->s_es->s_journal_inum)))
-+              return 0;
-+
-       while (bref < p+max) {
-               blk = le32_to_cpu(*bref++);
-               if (blk &&
index 8ea593dbf119ee2a14a9bda0a8de672117540562..397d79db0867c2bc571bf3ac01e06709f7efaefe 100644 (file)
@@ -28,7 +28,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
 
 --- a/fs/ext4/inode.c
 +++ b/fs/ext4/inode.c
-@@ -6006,7 +6006,7 @@ int ext4_expand_extra_isize(struct inode
+@@ -6002,7 +6002,7 @@ int ext4_expand_extra_isize(struct inode
  
        ext4_write_lock_xattr(inode, &no_expand);
  
diff --git a/queue-5.0/ext4-protect-journal-inode-s-blocks-using-block_validity.patch b/queue-5.0/ext4-protect-journal-inode-s-blocks-using-block_validity.patch
deleted file mode 100644 (file)
index b94fed6..0000000
+++ /dev/null
@@ -1,101 +0,0 @@
-From 345c0dbf3a30872d9b204db96b5857cd00808cae Mon Sep 17 00:00:00 2001
-From: Theodore Ts'o <tytso@mit.edu>
-Date: Tue, 9 Apr 2019 23:37:08 -0400
-Subject: ext4: protect journal inode's blocks using block_validity
-
-From: Theodore Ts'o <tytso@mit.edu>
-
-commit 345c0dbf3a30872d9b204db96b5857cd00808cae upstream.
-
-Add the blocks which belong to the journal inode to block_validity's
-system zone so attempts to deallocate or overwrite the journal due a
-corrupted file system where the journal blocks are also claimed by
-another inode.
-
-Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=202879
-Signed-off-by: Theodore Ts'o <tytso@mit.edu>
-Cc: stable@kernel.org
-Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
----
- fs/ext4/block_validity.c |   48 +++++++++++++++++++++++++++++++++++++++++++++++
- fs/ext4/inode.c          |    4 +++
- 2 files changed, 52 insertions(+)
-
---- a/fs/ext4/block_validity.c
-+++ b/fs/ext4/block_validity.c
-@@ -137,6 +137,48 @@ static void debug_print_tree(struct ext4
-       printk(KERN_CONT "\n");
- }
-+static int ext4_protect_reserved_inode(struct super_block *sb, u32 ino)
-+{
-+      struct inode *inode;
-+      struct ext4_sb_info *sbi = EXT4_SB(sb);
-+      struct ext4_map_blocks map;
-+      u32 i = 0, err = 0, num, n;
-+
-+      if ((ino < EXT4_ROOT_INO) ||
-+          (ino > le32_to_cpu(sbi->s_es->s_inodes_count)))
-+              return -EINVAL;
-+      inode = ext4_iget(sb, ino, EXT4_IGET_SPECIAL);
-+      if (IS_ERR(inode))
-+              return PTR_ERR(inode);
-+      num = (inode->i_size + sb->s_blocksize - 1) >> sb->s_blocksize_bits;
-+      while (i < num) {
-+              map.m_lblk = i;
-+              map.m_len = num - i;
-+              n = ext4_map_blocks(NULL, inode, &map, 0);
-+              if (n < 0) {
-+                      err = n;
-+                      break;
-+              }
-+              if (n == 0) {
-+                      i++;
-+              } else {
-+                      if (!ext4_data_block_valid(sbi, map.m_pblk, n)) {
-+                              ext4_error(sb, "blocks %llu-%llu from inode %u "
-+                                         "overlap system zone", map.m_pblk,
-+                                         map.m_pblk + map.m_len - 1, ino);
-+                              err = -EFSCORRUPTED;
-+                              break;
-+                      }
-+                      err = add_system_zone(sbi, map.m_pblk, n);
-+                      if (err < 0)
-+                              break;
-+                      i += n;
-+              }
-+      }
-+      iput(inode);
-+      return err;
-+}
-+
- int ext4_setup_system_zone(struct super_block *sb)
- {
-       ext4_group_t ngroups = ext4_get_groups_count(sb);
-@@ -171,6 +213,12 @@ int ext4_setup_system_zone(struct super_
-               if (ret)
-                       return ret;
-       }
-+      if (ext4_has_feature_journal(sb) && sbi->s_es->s_journal_inum) {
-+              ret = ext4_protect_reserved_inode(sb,
-+                              le32_to_cpu(sbi->s_es->s_journal_inum));
-+              if (ret)
-+                      return ret;
-+      }
-       if (test_opt(sb, DEBUG))
-               debug_print_tree(sbi);
---- a/fs/ext4/inode.c
-+++ b/fs/ext4/inode.c
-@@ -399,6 +399,10 @@ static int __check_block_validity(struct
-                               unsigned int line,
-                               struct ext4_map_blocks *map)
- {
-+      if (ext4_has_feature_journal(inode->i_sb) &&
-+          (inode->i_ino ==
-+           le32_to_cpu(EXT4_SB(inode->i_sb)->s_es->s_journal_inum)))
-+              return 0;
-       if (!ext4_data_block_valid(EXT4_SB(inode->i_sb), map->m_pblk,
-                                  map->m_len)) {
-               ext4_error_inode(inode, func, line, map->m_pblk,
diff --git a/queue-5.0/ext4-unsigned-int-compared-against-zero.patch b/queue-5.0/ext4-unsigned-int-compared-against-zero.patch
deleted file mode 100644 (file)
index 85dc8e9..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-From fbbbbd2f28aec991f3fbc248df211550fbdfd58c Mon Sep 17 00:00:00 2001
-From: Colin Ian King <colin.king@canonical.com>
-Date: Fri, 10 May 2019 22:06:38 -0400
-Subject: ext4: unsigned int compared against zero
-
-From: Colin Ian King <colin.king@canonical.com>
-
-commit fbbbbd2f28aec991f3fbc248df211550fbdfd58c upstream.
-
-There are two cases where u32 variables n and err are being checked
-for less than zero error values, the checks is always false because
-the variables are not signed. Fix this by making the variables ints.
-
-Addresses-Coverity: ("Unsigned compared against 0")
-Fixes: 345c0dbf3a30 ("ext4: protect journal inode's blocks using block_validity")
-Signed-off-by: Colin Ian King <colin.king@canonical.com>
-Signed-off-by: Theodore Ts'o <tytso@mit.edu>
-Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
----
- fs/ext4/block_validity.c |    3 ++-
- 1 file changed, 2 insertions(+), 1 deletion(-)
-
---- a/fs/ext4/block_validity.c
-+++ b/fs/ext4/block_validity.c
-@@ -142,7 +142,8 @@ static int ext4_protect_reserved_inode(s
-       struct inode *inode;
-       struct ext4_sb_info *sbi = EXT4_SB(sb);
-       struct ext4_map_blocks map;
--      u32 i = 0, err = 0, num, n;
-+      u32 i = 0, num;
-+      int err = 0, n;
-       if ((ino < EXT4_ROOT_INO) ||
-           (ino > le32_to_cpu(sbi->s_es->s_inodes_count)))
index 88513d65889c69aeed72a91536cfda56f6372376..d6ce389f251332409b0718130994970f93d349d2 100644 (file)
@@ -80,7 +80,6 @@ tty-vt.c-fix-tiocl_blankscreen-console-blanking-if-blankinterval-0.patch
 tty-vt-fix-write-write-race-in-ioctl-kdskbsent-handler.patch
 jbd2-check-superblock-mapped-prior-to-committing.patch
 ext4-make-sanity-check-in-mballoc-more-strict.patch
-ext4-protect-journal-inode-s-blocks-using-block_validity.patch
 ext4-ignore-e_value_offs-for-xattrs-with-value-in-ea-inode.patch
 ext4-avoid-drop-reference-to-iloc.bh-twice.patch
 ext4-fix-use-after-free-race-with-debug_want_extra_isize.patch
@@ -117,7 +116,5 @@ libnvdimm-namespace-fix-label-tracking-error.patch
 iov_iter-optimize-page_copy_sane.patch
 s390-mm-make-the-pxd_offset-functions-more-robust.patch
 s390-mm-convert-to-the-generic-get_user_pages_fast-code.patch
-ext4-unsigned-int-compared-against-zero.patch
-ext4-fix-block-validity-checks-for-journal-inodes-using-indirect-blocks.patch
 ext4-fix-compile-error-when-using-buffer_trace.patch
 ext4-don-t-update-s_rev_level-if-not-required.patch
diff --git a/queue-5.1/ext4-fix-block-validity-checks-for-journal-inodes-using-indirect-blocks.patch b/queue-5.1/ext4-fix-block-validity-checks-for-journal-inodes-using-indirect-blocks.patch
deleted file mode 100644 (file)
index dd17d55..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-From 170417c8c7bb2cbbdd949bf5c443c0c8f24a203b Mon Sep 17 00:00:00 2001
-From: Theodore Ts'o <tytso@mit.edu>
-Date: Wed, 15 May 2019 00:51:19 -0400
-Subject: ext4: fix block validity checks for journal inodes using indirect blocks
-
-From: Theodore Ts'o <tytso@mit.edu>
-
-commit 170417c8c7bb2cbbdd949bf5c443c0c8f24a203b upstream.
-
-Commit 345c0dbf3a30 ("ext4: protect journal inode's blocks using
-block_validity") failed to add an exception for the journal inode in
-ext4_check_blockref(), which is the function used by ext4_get_branch()
-for indirect blocks.  This caused attempts to read from the ext3-style
-journals to fail with:
-
-[  848.968550] EXT4-fs error (device sdb7): ext4_get_branch:171: inode #8: block 30343695: comm jbd2/sdb7-8: invalid block
-
-Fix this by adding the missing exception check.
-
-Fixes: 345c0dbf3a30 ("ext4: protect journal inode's blocks using block_validity")
-Reported-by: Arthur Marsh <arthur.marsh@internode.on.net>
-Signed-off-by: Theodore Ts'o <tytso@mit.edu>
-Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
----
- fs/ext4/block_validity.c |    5 +++++
- 1 file changed, 5 insertions(+)
-
---- a/fs/ext4/block_validity.c
-+++ b/fs/ext4/block_validity.c
-@@ -276,6 +276,11 @@ int ext4_check_blockref(const char *func
-       __le32 *bref = p;
-       unsigned int blk;
-+      if (ext4_has_feature_journal(inode->i_sb) &&
-+          (inode->i_ino ==
-+           le32_to_cpu(EXT4_SB(inode->i_sb)->s_es->s_journal_inum)))
-+              return 0;
-+
-       while (bref < p+max) {
-               blk = le32_to_cpu(*bref++);
-               if (blk &&
diff --git a/queue-5.1/ext4-protect-journal-inode-s-blocks-using-block_validity.patch b/queue-5.1/ext4-protect-journal-inode-s-blocks-using-block_validity.patch
deleted file mode 100644 (file)
index b94fed6..0000000
+++ /dev/null
@@ -1,101 +0,0 @@
-From 345c0dbf3a30872d9b204db96b5857cd00808cae Mon Sep 17 00:00:00 2001
-From: Theodore Ts'o <tytso@mit.edu>
-Date: Tue, 9 Apr 2019 23:37:08 -0400
-Subject: ext4: protect journal inode's blocks using block_validity
-
-From: Theodore Ts'o <tytso@mit.edu>
-
-commit 345c0dbf3a30872d9b204db96b5857cd00808cae upstream.
-
-Add the blocks which belong to the journal inode to block_validity's
-system zone so attempts to deallocate or overwrite the journal due a
-corrupted file system where the journal blocks are also claimed by
-another inode.
-
-Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=202879
-Signed-off-by: Theodore Ts'o <tytso@mit.edu>
-Cc: stable@kernel.org
-Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
----
- fs/ext4/block_validity.c |   48 +++++++++++++++++++++++++++++++++++++++++++++++
- fs/ext4/inode.c          |    4 +++
- 2 files changed, 52 insertions(+)
-
---- a/fs/ext4/block_validity.c
-+++ b/fs/ext4/block_validity.c
-@@ -137,6 +137,48 @@ static void debug_print_tree(struct ext4
-       printk(KERN_CONT "\n");
- }
-+static int ext4_protect_reserved_inode(struct super_block *sb, u32 ino)
-+{
-+      struct inode *inode;
-+      struct ext4_sb_info *sbi = EXT4_SB(sb);
-+      struct ext4_map_blocks map;
-+      u32 i = 0, err = 0, num, n;
-+
-+      if ((ino < EXT4_ROOT_INO) ||
-+          (ino > le32_to_cpu(sbi->s_es->s_inodes_count)))
-+              return -EINVAL;
-+      inode = ext4_iget(sb, ino, EXT4_IGET_SPECIAL);
-+      if (IS_ERR(inode))
-+              return PTR_ERR(inode);
-+      num = (inode->i_size + sb->s_blocksize - 1) >> sb->s_blocksize_bits;
-+      while (i < num) {
-+              map.m_lblk = i;
-+              map.m_len = num - i;
-+              n = ext4_map_blocks(NULL, inode, &map, 0);
-+              if (n < 0) {
-+                      err = n;
-+                      break;
-+              }
-+              if (n == 0) {
-+                      i++;
-+              } else {
-+                      if (!ext4_data_block_valid(sbi, map.m_pblk, n)) {
-+                              ext4_error(sb, "blocks %llu-%llu from inode %u "
-+                                         "overlap system zone", map.m_pblk,
-+                                         map.m_pblk + map.m_len - 1, ino);
-+                              err = -EFSCORRUPTED;
-+                              break;
-+                      }
-+                      err = add_system_zone(sbi, map.m_pblk, n);
-+                      if (err < 0)
-+                              break;
-+                      i += n;
-+              }
-+      }
-+      iput(inode);
-+      return err;
-+}
-+
- int ext4_setup_system_zone(struct super_block *sb)
- {
-       ext4_group_t ngroups = ext4_get_groups_count(sb);
-@@ -171,6 +213,12 @@ int ext4_setup_system_zone(struct super_
-               if (ret)
-                       return ret;
-       }
-+      if (ext4_has_feature_journal(sb) && sbi->s_es->s_journal_inum) {
-+              ret = ext4_protect_reserved_inode(sb,
-+                              le32_to_cpu(sbi->s_es->s_journal_inum));
-+              if (ret)
-+                      return ret;
-+      }
-       if (test_opt(sb, DEBUG))
-               debug_print_tree(sbi);
---- a/fs/ext4/inode.c
-+++ b/fs/ext4/inode.c
-@@ -399,6 +399,10 @@ static int __check_block_validity(struct
-                               unsigned int line,
-                               struct ext4_map_blocks *map)
- {
-+      if (ext4_has_feature_journal(inode->i_sb) &&
-+          (inode->i_ino ==
-+           le32_to_cpu(EXT4_SB(inode->i_sb)->s_es->s_journal_inum)))
-+              return 0;
-       if (!ext4_data_block_valid(EXT4_SB(inode->i_sb), map->m_pblk,
-                                  map->m_len)) {
-               ext4_error_inode(inode, func, line, map->m_pblk,
diff --git a/queue-5.1/ext4-unsigned-int-compared-against-zero.patch b/queue-5.1/ext4-unsigned-int-compared-against-zero.patch
deleted file mode 100644 (file)
index 85dc8e9..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-From fbbbbd2f28aec991f3fbc248df211550fbdfd58c Mon Sep 17 00:00:00 2001
-From: Colin Ian King <colin.king@canonical.com>
-Date: Fri, 10 May 2019 22:06:38 -0400
-Subject: ext4: unsigned int compared against zero
-
-From: Colin Ian King <colin.king@canonical.com>
-
-commit fbbbbd2f28aec991f3fbc248df211550fbdfd58c upstream.
-
-There are two cases where u32 variables n and err are being checked
-for less than zero error values, the checks is always false because
-the variables are not signed. Fix this by making the variables ints.
-
-Addresses-Coverity: ("Unsigned compared against 0")
-Fixes: 345c0dbf3a30 ("ext4: protect journal inode's blocks using block_validity")
-Signed-off-by: Colin Ian King <colin.king@canonical.com>
-Signed-off-by: Theodore Ts'o <tytso@mit.edu>
-Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
----
- fs/ext4/block_validity.c |    3 ++-
- 1 file changed, 2 insertions(+), 1 deletion(-)
-
---- a/fs/ext4/block_validity.c
-+++ b/fs/ext4/block_validity.c
-@@ -142,7 +142,8 @@ static int ext4_protect_reserved_inode(s
-       struct inode *inode;
-       struct ext4_sb_info *sbi = EXT4_SB(sb);
-       struct ext4_map_blocks map;
--      u32 i = 0, err = 0, num, n;
-+      u32 i = 0, num;
-+      int err = 0, n;
-       if ((ino < EXT4_ROOT_INO) ||
-           (ino > le32_to_cpu(sbi->s_es->s_inodes_count)))
index 642e48f92229ddd04e72b8f8261bd9ffdce1ef2e..5b9cab4d5ae40cb1e4653364f8a58076788f07c3 100644 (file)
@@ -83,7 +83,6 @@ tty-vt.c-fix-tiocl_blankscreen-console-blanking-if-blankinterval-0.patch
 tty-vt-fix-write-write-race-in-ioctl-kdskbsent-handler.patch
 jbd2-check-superblock-mapped-prior-to-committing.patch
 ext4-make-sanity-check-in-mballoc-more-strict.patch
-ext4-protect-journal-inode-s-blocks-using-block_validity.patch
 ext4-ignore-e_value_offs-for-xattrs-with-value-in-ea-inode.patch
 ext4-avoid-drop-reference-to-iloc.bh-twice.patch
 ext4-fix-use-after-free-race-with-debug_want_extra_isize.patch
@@ -124,5 +123,3 @@ powerpc-32s-fix-flush_hash_pages-on-smp.patch
 libnvdimm-namespace-fix-label-tracking-error.patch
 s390-mm-make-the-pxd_offset-functions-more-robust.patch
 s390-mm-convert-to-the-generic-get_user_pages_fast-code.patch
-ext4-unsigned-int-compared-against-zero.patch
-ext4-fix-block-validity-checks-for-journal-inodes-using-indirect-blocks.patch