]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
drop ext4-fix-superblock-checksum-calculation-race.patch from everywhere
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 4 Nov 2020 09:13:19 +0000 (10:13 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 4 Nov 2020 09:13:19 +0000 (10:13 +0100)
13 files changed:
queue-4.14/ext4-fix-superblock-checksum-calculation-race.patch [deleted file]
queue-4.14/series
queue-4.19/ext4-fix-superblock-checksum-calculation-race.patch [deleted file]
queue-4.19/series
queue-4.4/ext4-fix-superblock-checksum-calculation-race.patch [deleted file]
queue-4.4/series
queue-4.9/ext4-fix-superblock-checksum-calculation-race.patch [deleted file]
queue-4.9/series
queue-5.4/ext4-fix-superblock-checksum-calculation-race.patch [deleted file]
queue-5.4/series
queue-5.9/ext4-fix-bdev-write-error-check-failed-when-mount-fs-with-ro.patch
queue-5.9/ext4-fix-superblock-checksum-calculation-race.patch [deleted file]
queue-5.9/series

diff --git a/queue-4.14/ext4-fix-superblock-checksum-calculation-race.patch b/queue-4.14/ext4-fix-superblock-checksum-calculation-race.patch
deleted file mode 100644 (file)
index dc0af69..0000000
+++ /dev/null
@@ -1,60 +0,0 @@
-From acaa532687cdc3a03757defafece9c27aa667546 Mon Sep 17 00:00:00 2001
-From: Constantine Sapuntzakis <costa@purestorage.com>
-Date: Mon, 14 Sep 2020 10:10:14 -0600
-Subject: ext4: fix superblock checksum calculation race
-
-From: Constantine Sapuntzakis <costa@purestorage.com>
-
-commit acaa532687cdc3a03757defafece9c27aa667546 upstream.
-
-The race condition could cause the persisted superblock checksum
-to not match the contents of the superblock, causing the
-superblock to be considered corrupt.
-
-An example of the race follows.  A first thread is interrupted in the
-middle of a checksum calculation. Then, another thread changes the
-superblock, calculates a new checksum, and sets it. Then, the first
-thread resumes and sets the checksum based on the older superblock.
-
-To fix, serialize the superblock checksum calculation using the buffer
-header lock. While a spinlock is sufficient, the buffer header is
-already there and there is precedent for locking it (e.g. in
-ext4_commit_super).
-
-Tested the patch by booting up a kernel with the patch, creating
-a filesystem and some files (including some orphans), and then
-unmounting and remounting the file system.
-
-Cc: stable@kernel.org
-Signed-off-by: Constantine Sapuntzakis <costa@purestorage.com>
-Reviewed-by: Jan Kara <jack@suse.cz>
-Suggested-by: Jan Kara <jack@suse.cz>
-Link: https://lore.kernel.org/r/20200914161014.22275-1-costa@purestorage.com
-Signed-off-by: Theodore Ts'o <tytso@mit.edu>
-Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
----
- fs/ext4/super.c |   11 +++++++++++
- 1 file changed, 11 insertions(+)
-
---- a/fs/ext4/super.c
-+++ b/fs/ext4/super.c
-@@ -200,7 +200,18 @@ void ext4_superblock_csum_set(struct sup
-       if (!ext4_has_metadata_csum(sb))
-               return;
-+      /*
-+       * Locking the superblock prevents the scenario
-+       * where:
-+       *  1) a first thread pauses during checksum calculation.
-+       *  2) a second thread updates the superblock, recalculates
-+       *     the checksum, and updates s_checksum
-+       *  3) the first thread resumes and finishes its checksum calculation
-+       *     and updates s_checksum with a potentially stale or torn value.
-+       */
-+      lock_buffer(EXT4_SB(sb)->s_sbh);
-       es->s_checksum = ext4_superblock_csum(sb, es);
-+      unlock_buffer(EXT4_SB(sb)->s_sbh);
- }
- void *ext4_kvmalloc(size_t size, gfp_t flags)
index 6e845ea0b7cc51ed031d602468753aab6846ffd9..d64e4be76b9abfa31b4d47b4628bd1179d3b6b1f 100644 (file)
@@ -107,7 +107,6 @@ vringh-fix-__vringh_iov-when-riov-and-wiov-are-different.patch
 ext4-fix-leaking-sysfs-kobject-after-failed-mount.patch
 ext4-fix-error-handling-code-in-add_new_gdb.patch
 ext4-fix-invalid-inode-checksum.patch
-ext4-fix-superblock-checksum-calculation-race.patch
 drm-ttm-fix-eviction-valuable-range-check.patch
 rtc-rx8010-don-t-modify-the-global-rtc-ops.patch
 tty-make-fontx-ioctl-use-the-tty-pointer-they-were-actually-passed.patch
diff --git a/queue-4.19/ext4-fix-superblock-checksum-calculation-race.patch b/queue-4.19/ext4-fix-superblock-checksum-calculation-race.patch
deleted file mode 100644 (file)
index dc0af69..0000000
+++ /dev/null
@@ -1,60 +0,0 @@
-From acaa532687cdc3a03757defafece9c27aa667546 Mon Sep 17 00:00:00 2001
-From: Constantine Sapuntzakis <costa@purestorage.com>
-Date: Mon, 14 Sep 2020 10:10:14 -0600
-Subject: ext4: fix superblock checksum calculation race
-
-From: Constantine Sapuntzakis <costa@purestorage.com>
-
-commit acaa532687cdc3a03757defafece9c27aa667546 upstream.
-
-The race condition could cause the persisted superblock checksum
-to not match the contents of the superblock, causing the
-superblock to be considered corrupt.
-
-An example of the race follows.  A first thread is interrupted in the
-middle of a checksum calculation. Then, another thread changes the
-superblock, calculates a new checksum, and sets it. Then, the first
-thread resumes and sets the checksum based on the older superblock.
-
-To fix, serialize the superblock checksum calculation using the buffer
-header lock. While a spinlock is sufficient, the buffer header is
-already there and there is precedent for locking it (e.g. in
-ext4_commit_super).
-
-Tested the patch by booting up a kernel with the patch, creating
-a filesystem and some files (including some orphans), and then
-unmounting and remounting the file system.
-
-Cc: stable@kernel.org
-Signed-off-by: Constantine Sapuntzakis <costa@purestorage.com>
-Reviewed-by: Jan Kara <jack@suse.cz>
-Suggested-by: Jan Kara <jack@suse.cz>
-Link: https://lore.kernel.org/r/20200914161014.22275-1-costa@purestorage.com
-Signed-off-by: Theodore Ts'o <tytso@mit.edu>
-Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
----
- fs/ext4/super.c |   11 +++++++++++
- 1 file changed, 11 insertions(+)
-
---- a/fs/ext4/super.c
-+++ b/fs/ext4/super.c
-@@ -200,7 +200,18 @@ void ext4_superblock_csum_set(struct sup
-       if (!ext4_has_metadata_csum(sb))
-               return;
-+      /*
-+       * Locking the superblock prevents the scenario
-+       * where:
-+       *  1) a first thread pauses during checksum calculation.
-+       *  2) a second thread updates the superblock, recalculates
-+       *     the checksum, and updates s_checksum
-+       *  3) the first thread resumes and finishes its checksum calculation
-+       *     and updates s_checksum with a potentially stale or torn value.
-+       */
-+      lock_buffer(EXT4_SB(sb)->s_sbh);
-       es->s_checksum = ext4_superblock_csum(sb, es);
-+      unlock_buffer(EXT4_SB(sb)->s_sbh);
- }
- void *ext4_kvmalloc(size_t size, gfp_t flags)
index adcbd52152ec91a9d1c84b5e6cdda8cf4cd21e71..60ac5b4c630992ae17bd815161e14e4ee2adfa18 100644 (file)
@@ -174,7 +174,6 @@ vringh-fix-__vringh_iov-when-riov-and-wiov-are-different.patch
 ext4-fix-leaking-sysfs-kobject-after-failed-mount.patch
 ext4-fix-error-handling-code-in-add_new_gdb.patch
 ext4-fix-invalid-inode-checksum.patch
-ext4-fix-superblock-checksum-calculation-race.patch
 drm-ttm-fix-eviction-valuable-range-check.patch
 rtc-rx8010-don-t-modify-the-global-rtc-ops.patch
 tty-make-fontx-ioctl-use-the-tty-pointer-they-were-actually-passed.patch
diff --git a/queue-4.4/ext4-fix-superblock-checksum-calculation-race.patch b/queue-4.4/ext4-fix-superblock-checksum-calculation-race.patch
deleted file mode 100644 (file)
index e0f80b6..0000000
+++ /dev/null
@@ -1,60 +0,0 @@
-From acaa532687cdc3a03757defafece9c27aa667546 Mon Sep 17 00:00:00 2001
-From: Constantine Sapuntzakis <costa@purestorage.com>
-Date: Mon, 14 Sep 2020 10:10:14 -0600
-Subject: ext4: fix superblock checksum calculation race
-
-From: Constantine Sapuntzakis <costa@purestorage.com>
-
-commit acaa532687cdc3a03757defafece9c27aa667546 upstream.
-
-The race condition could cause the persisted superblock checksum
-to not match the contents of the superblock, causing the
-superblock to be considered corrupt.
-
-An example of the race follows.  A first thread is interrupted in the
-middle of a checksum calculation. Then, another thread changes the
-superblock, calculates a new checksum, and sets it. Then, the first
-thread resumes and sets the checksum based on the older superblock.
-
-To fix, serialize the superblock checksum calculation using the buffer
-header lock. While a spinlock is sufficient, the buffer header is
-already there and there is precedent for locking it (e.g. in
-ext4_commit_super).
-
-Tested the patch by booting up a kernel with the patch, creating
-a filesystem and some files (including some orphans), and then
-unmounting and remounting the file system.
-
-Cc: stable@kernel.org
-Signed-off-by: Constantine Sapuntzakis <costa@purestorage.com>
-Reviewed-by: Jan Kara <jack@suse.cz>
-Suggested-by: Jan Kara <jack@suse.cz>
-Link: https://lore.kernel.org/r/20200914161014.22275-1-costa@purestorage.com
-Signed-off-by: Theodore Ts'o <tytso@mit.edu>
-Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
----
- fs/ext4/super.c |   11 +++++++++++
- 1 file changed, 11 insertions(+)
-
---- a/fs/ext4/super.c
-+++ b/fs/ext4/super.c
-@@ -144,7 +144,18 @@ void ext4_superblock_csum_set(struct sup
-       if (!ext4_has_metadata_csum(sb))
-               return;
-+      /*
-+       * Locking the superblock prevents the scenario
-+       * where:
-+       *  1) a first thread pauses during checksum calculation.
-+       *  2) a second thread updates the superblock, recalculates
-+       *     the checksum, and updates s_checksum
-+       *  3) the first thread resumes and finishes its checksum calculation
-+       *     and updates s_checksum with a potentially stale or torn value.
-+       */
-+      lock_buffer(EXT4_SB(sb)->s_sbh);
-       es->s_checksum = ext4_superblock_csum(sb, es);
-+      unlock_buffer(EXT4_SB(sb)->s_sbh);
- }
- void *ext4_kvmalloc(size_t size, gfp_t flags)
index 0167d18b82fe14f0cf27ef22bc0de450add71455..d4a2e692a674dd2f38c889a7f1504732ef5eb68b 100644 (file)
@@ -54,7 +54,6 @@ libceph-clear-con-out_msg-on-policy-stateful_server-faults.patch
 9p-cast-to-loff_t-before-multiplying.patch
 ring-buffer-return-0-on-success-from-ring_buffer_resize.patch
 vringh-fix-__vringh_iov-when-riov-and-wiov-are-different.patch
-ext4-fix-superblock-checksum-calculation-race.patch
 tty-make-fontx-ioctl-use-the-tty-pointer-they-were-actually-passed.patch
 arm64-berlin-select-dw_apb_timer_of.patch
 cachefiles-handle-readpage-error-correctly.patch
diff --git a/queue-4.9/ext4-fix-superblock-checksum-calculation-race.patch b/queue-4.9/ext4-fix-superblock-checksum-calculation-race.patch
deleted file mode 100644 (file)
index 69013cc..0000000
+++ /dev/null
@@ -1,60 +0,0 @@
-From acaa532687cdc3a03757defafece9c27aa667546 Mon Sep 17 00:00:00 2001
-From: Constantine Sapuntzakis <costa@purestorage.com>
-Date: Mon, 14 Sep 2020 10:10:14 -0600
-Subject: ext4: fix superblock checksum calculation race
-
-From: Constantine Sapuntzakis <costa@purestorage.com>
-
-commit acaa532687cdc3a03757defafece9c27aa667546 upstream.
-
-The race condition could cause the persisted superblock checksum
-to not match the contents of the superblock, causing the
-superblock to be considered corrupt.
-
-An example of the race follows.  A first thread is interrupted in the
-middle of a checksum calculation. Then, another thread changes the
-superblock, calculates a new checksum, and sets it. Then, the first
-thread resumes and sets the checksum based on the older superblock.
-
-To fix, serialize the superblock checksum calculation using the buffer
-header lock. While a spinlock is sufficient, the buffer header is
-already there and there is precedent for locking it (e.g. in
-ext4_commit_super).
-
-Tested the patch by booting up a kernel with the patch, creating
-a filesystem and some files (including some orphans), and then
-unmounting and remounting the file system.
-
-Cc: stable@kernel.org
-Signed-off-by: Constantine Sapuntzakis <costa@purestorage.com>
-Reviewed-by: Jan Kara <jack@suse.cz>
-Suggested-by: Jan Kara <jack@suse.cz>
-Link: https://lore.kernel.org/r/20200914161014.22275-1-costa@purestorage.com
-Signed-off-by: Theodore Ts'o <tytso@mit.edu>
-Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
----
- fs/ext4/super.c |   11 +++++++++++
- 1 file changed, 11 insertions(+)
-
---- a/fs/ext4/super.c
-+++ b/fs/ext4/super.c
-@@ -175,7 +175,18 @@ void ext4_superblock_csum_set(struct sup
-       if (!ext4_has_metadata_csum(sb))
-               return;
-+      /*
-+       * Locking the superblock prevents the scenario
-+       * where:
-+       *  1) a first thread pauses during checksum calculation.
-+       *  2) a second thread updates the superblock, recalculates
-+       *     the checksum, and updates s_checksum
-+       *  3) the first thread resumes and finishes its checksum calculation
-+       *     and updates s_checksum with a potentially stale or torn value.
-+       */
-+      lock_buffer(EXT4_SB(sb)->s_sbh);
-       es->s_checksum = ext4_superblock_csum(sb, es);
-+      unlock_buffer(EXT4_SB(sb)->s_sbh);
- }
- void *ext4_kvmalloc(size_t size, gfp_t flags)
index ea50c791325bbac25a3be5e5fd3d55dc93e47041..567917e70d6b91ff8a9252dac9ccde7039dce58c 100644 (file)
@@ -76,7 +76,6 @@ libceph-clear-con-out_msg-on-policy-stateful_server-faults.patch
 9p-cast-to-loff_t-before-multiplying.patch
 ring-buffer-return-0-on-success-from-ring_buffer_resize.patch
 vringh-fix-__vringh_iov-when-riov-and-wiov-are-different.patch
-ext4-fix-superblock-checksum-calculation-race.patch
 rtc-rx8010-don-t-modify-the-global-rtc-ops.patch
 tty-make-fontx-ioctl-use-the-tty-pointer-they-were-actually-passed.patch
 arm64-berlin-select-dw_apb_timer_of.patch
diff --git a/queue-5.4/ext4-fix-superblock-checksum-calculation-race.patch b/queue-5.4/ext4-fix-superblock-checksum-calculation-race.patch
deleted file mode 100644 (file)
index 4ba823e..0000000
+++ /dev/null
@@ -1,60 +0,0 @@
-From acaa532687cdc3a03757defafece9c27aa667546 Mon Sep 17 00:00:00 2001
-From: Constantine Sapuntzakis <costa@purestorage.com>
-Date: Mon, 14 Sep 2020 10:10:14 -0600
-Subject: ext4: fix superblock checksum calculation race
-
-From: Constantine Sapuntzakis <costa@purestorage.com>
-
-commit acaa532687cdc3a03757defafece9c27aa667546 upstream.
-
-The race condition could cause the persisted superblock checksum
-to not match the contents of the superblock, causing the
-superblock to be considered corrupt.
-
-An example of the race follows.  A first thread is interrupted in the
-middle of a checksum calculation. Then, another thread changes the
-superblock, calculates a new checksum, and sets it. Then, the first
-thread resumes and sets the checksum based on the older superblock.
-
-To fix, serialize the superblock checksum calculation using the buffer
-header lock. While a spinlock is sufficient, the buffer header is
-already there and there is precedent for locking it (e.g. in
-ext4_commit_super).
-
-Tested the patch by booting up a kernel with the patch, creating
-a filesystem and some files (including some orphans), and then
-unmounting and remounting the file system.
-
-Cc: stable@kernel.org
-Signed-off-by: Constantine Sapuntzakis <costa@purestorage.com>
-Reviewed-by: Jan Kara <jack@suse.cz>
-Suggested-by: Jan Kara <jack@suse.cz>
-Link: https://lore.kernel.org/r/20200914161014.22275-1-costa@purestorage.com
-Signed-off-by: Theodore Ts'o <tytso@mit.edu>
-Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
----
- fs/ext4/super.c |   11 +++++++++++
- 1 file changed, 11 insertions(+)
-
---- a/fs/ext4/super.c
-+++ b/fs/ext4/super.c
-@@ -201,7 +201,18 @@ void ext4_superblock_csum_set(struct sup
-       if (!ext4_has_metadata_csum(sb))
-               return;
-+      /*
-+       * Locking the superblock prevents the scenario
-+       * where:
-+       *  1) a first thread pauses during checksum calculation.
-+       *  2) a second thread updates the superblock, recalculates
-+       *     the checksum, and updates s_checksum
-+       *  3) the first thread resumes and finishes its checksum calculation
-+       *     and updates s_checksum with a potentially stale or torn value.
-+       */
-+      lock_buffer(EXT4_SB(sb)->s_sbh);
-       es->s_checksum = ext4_superblock_csum(sb, es);
-+      unlock_buffer(EXT4_SB(sb)->s_sbh);
- }
- void *ext4_kvmalloc(size_t size, gfp_t flags)
index 7647ec9623c971783cb335a05be11de71d7c11d4..194167708548f58497c98e7944f28e5a323b001c 100644 (file)
@@ -192,7 +192,6 @@ vringh-fix-__vringh_iov-when-riov-and-wiov-are-different.patch
 ext4-fix-leaking-sysfs-kobject-after-failed-mount.patch
 ext4-fix-error-handling-code-in-add_new_gdb.patch
 ext4-fix-invalid-inode-checksum.patch
-ext4-fix-superblock-checksum-calculation-race.patch
 drm-ttm-fix-eviction-valuable-range-check.patch
 mmc-sdhci-of-esdhc-set-timeout-to-max-before-tuning.patch
 mmc-sdhci-use-auto-cmd-auto-select-only-when-v4_mode-is-true.patch
index 7f6fffea4d1afcefb62a10e9aa3f7afb153f8c34..91b0c1609ef713a7422169928b5a2e709b401fb8 100644 (file)
@@ -33,7 +33,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
 
 --- a/fs/ext4/super.c
 +++ b/fs/ext4/super.c
-@@ -4826,9 +4826,8 @@ no_journal:
+@@ -4815,9 +4815,8 @@ no_journal:
         * used to detect the metadata async write error.
         */
        spin_lock_init(&sbi->s_bdev_wb_lock);
@@ -45,7 +45,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
        sb->s_bdev->bd_super = sb;
        EXT4_SB(sb)->s_mount_state |= EXT4_ORPHAN_FS;
        ext4_orphan_cleanup(sb, es);
-@@ -5721,14 +5720,6 @@ static int ext4_remount(struct super_blo
+@@ -5710,14 +5709,6 @@ static int ext4_remount(struct super_blo
                        }
  
                        /*
diff --git a/queue-5.9/ext4-fix-superblock-checksum-calculation-race.patch b/queue-5.9/ext4-fix-superblock-checksum-calculation-race.patch
deleted file mode 100644 (file)
index 2f42d52..0000000
+++ /dev/null
@@ -1,60 +0,0 @@
-From acaa532687cdc3a03757defafece9c27aa667546 Mon Sep 17 00:00:00 2001
-From: Constantine Sapuntzakis <costa@purestorage.com>
-Date: Mon, 14 Sep 2020 10:10:14 -0600
-Subject: ext4: fix superblock checksum calculation race
-
-From: Constantine Sapuntzakis <costa@purestorage.com>
-
-commit acaa532687cdc3a03757defafece9c27aa667546 upstream.
-
-The race condition could cause the persisted superblock checksum
-to not match the contents of the superblock, causing the
-superblock to be considered corrupt.
-
-An example of the race follows.  A first thread is interrupted in the
-middle of a checksum calculation. Then, another thread changes the
-superblock, calculates a new checksum, and sets it. Then, the first
-thread resumes and sets the checksum based on the older superblock.
-
-To fix, serialize the superblock checksum calculation using the buffer
-header lock. While a spinlock is sufficient, the buffer header is
-already there and there is precedent for locking it (e.g. in
-ext4_commit_super).
-
-Tested the patch by booting up a kernel with the patch, creating
-a filesystem and some files (including some orphans), and then
-unmounting and remounting the file system.
-
-Cc: stable@kernel.org
-Signed-off-by: Constantine Sapuntzakis <costa@purestorage.com>
-Reviewed-by: Jan Kara <jack@suse.cz>
-Suggested-by: Jan Kara <jack@suse.cz>
-Link: https://lore.kernel.org/r/20200914161014.22275-1-costa@purestorage.com
-Signed-off-by: Theodore Ts'o <tytso@mit.edu>
-Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
----
- fs/ext4/super.c |   11 +++++++++++
- 1 file changed, 11 insertions(+)
-
---- a/fs/ext4/super.c
-+++ b/fs/ext4/super.c
-@@ -201,7 +201,18 @@ void ext4_superblock_csum_set(struct sup
-       if (!ext4_has_metadata_csum(sb))
-               return;
-+      /*
-+       * Locking the superblock prevents the scenario
-+       * where:
-+       *  1) a first thread pauses during checksum calculation.
-+       *  2) a second thread updates the superblock, recalculates
-+       *     the checksum, and updates s_checksum
-+       *  3) the first thread resumes and finishes its checksum calculation
-+       *     and updates s_checksum with a potentially stale or torn value.
-+       */
-+      lock_buffer(EXT4_SB(sb)->s_sbh);
-       es->s_checksum = ext4_superblock_csum(sb, es);
-+      unlock_buffer(EXT4_SB(sb)->s_sbh);
- }
- ext4_fsblk_t ext4_block_bitmap(struct super_block *sb,
index 239ea3fdc89b9527de249b5635cb08779ac3ff23..2857957d5dc96220cf7b5ead80548218d7645867 100644 (file)
@@ -341,7 +341,6 @@ ext4-fix-leaking-sysfs-kobject-after-failed-mount.patch
 ext4-fix-error-handling-code-in-add_new_gdb.patch
 ext4-implement-swap_activate-aops-using-iomap.patch
 ext4-fix-invalid-inode-checksum.patch
-ext4-fix-superblock-checksum-calculation-race.patch
 ext4-clear-buffer-verified-flag-if-read-meta-block-from-disk.patch
 ext4-fix-bdev-write-error-check-failed-when-mount-fs-with-ro.patch
 ext4-fix-bs-ps-issue-reported-with-dioread_nolock-mount-opt.patch