From: Greg Kroah-Hartman Date: Thu, 10 Oct 2024 09:38:26 +0000 (+0200) Subject: drop offending ext4 patch from all branches X-Git-Tag: v6.6.55~1 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=9977ce956afcbed25d3a339c1995cba983af3968;p=thirdparty%2Fkernel%2Fstable-queue.git drop offending ext4 patch from all branches --- diff --git a/queue-5.15/ext4-don-t-set-sb_rdonly-after-filesystem-errors.patch b/queue-5.15/ext4-don-t-set-sb_rdonly-after-filesystem-errors.patch deleted file mode 100644 index 63f4cdb14a6..00000000000 --- a/queue-5.15/ext4-don-t-set-sb_rdonly-after-filesystem-errors.patch +++ /dev/null @@ -1,56 +0,0 @@ -From e646f8d16514828ccde2645053b61c709761bca5 Mon Sep 17 00:00:00 2001 -From: Sasha Levin -Date: Mon, 5 Aug 2024 22:12:41 +0200 -Subject: ext4: don't set SB_RDONLY after filesystem errors - -From: Jan Kara - -[ Upstream commit d3476f3dad4ad68ae5f6b008ea6591d1520da5d8 ] - -When the filesystem is mounted with errors=remount-ro, we were setting -SB_RDONLY flag to stop all filesystem modifications. We knew this misses -proper locking (sb->s_umount) and does not go through proper filesystem -remount procedure but it has been the way this worked since early ext2 -days and it was good enough for catastrophic situation damage -mitigation. Recently, syzbot has found a way (see link) to trigger -warnings in filesystem freezing because the code got confused by -SB_RDONLY changing under its hands. Since these days we set -EXT4_FLAGS_SHUTDOWN on the superblock which is enough to stop all -filesystem modifications, modifying SB_RDONLY shouldn't be needed. So -stop doing that. - -Link: https://lore.kernel.org/all/000000000000b90a8e061e21d12f@google.com -Reported-by: Christian Brauner -Signed-off-by: Jan Kara -Reviewed-by: Christian Brauner -Link: https://patch.msgid.link/20240805201241.27286-1-jack@suse.cz -Signed-off-by: Theodore Ts'o -Signed-off-by: Sasha Levin ---- - fs/ext4/super.c | 9 +++++---- - 1 file changed, 5 insertions(+), 4 deletions(-) - -diff --git a/fs/ext4/super.c b/fs/ext4/super.c -index b09b7a6b7a154..93eb26c162422 100644 ---- a/fs/ext4/super.c -+++ b/fs/ext4/super.c -@@ -674,11 +674,12 @@ static void ext4_handle_error(struct super_block *sb, bool force_ro, int error, - - ext4_msg(sb, KERN_CRIT, "Remounting filesystem read-only"); - /* -- * Make sure updated value of ->s_mount_flags will be visible before -- * ->s_flags update -+ * EXT4_FLAGS_SHUTDOWN was set which stops all filesystem -+ * modifications. We don't set SB_RDONLY because that requires -+ * sb->s_umount semaphore and setting it without proper remount -+ * procedure is confusing code such as freeze_super() leading to -+ * deadlocks and other problems. - */ -- smp_wmb(); -- sb->s_flags |= SB_RDONLY; - } - - static void flush_stashed_error_work(struct work_struct *work) --- -2.43.0 - diff --git a/queue-5.15/series b/queue-5.15/series index c99729724d6..7b1b4ff1073 100644 --- a/queue-5.15/series +++ b/queue-5.15/series @@ -470,7 +470,6 @@ scsi-aacraid-rearrange-order-of-struct-aac_srb_unit.patch drm-radeon-r100-handle-unknown-family-in-r100_cp_ini.patch drm-amd-pm-ensure-the-fw_info-is-not-null-before-usi.patch of-irq-refer-to-actual-buffer-size-in-of_irq_parse_o.patch -ext4-don-t-set-sb_rdonly-after-filesystem-errors.patch ext4-ext4_search_dir-should-return-a-proper-error.patch ext4-avoid-use-after-free-in-ext4_ext_show_leaf.patch ext4-fix-i_data_sem-unlock-order-in-ext4_ind_migrate.patch diff --git a/queue-6.1/ext4-don-t-set-sb_rdonly-after-filesystem-errors.patch b/queue-6.1/ext4-don-t-set-sb_rdonly-after-filesystem-errors.patch deleted file mode 100644 index 4caae336f47..00000000000 --- a/queue-6.1/ext4-don-t-set-sb_rdonly-after-filesystem-errors.patch +++ /dev/null @@ -1,56 +0,0 @@ -From 43b28460c0dcbff4d2f0c469e57f599febebbf1f Mon Sep 17 00:00:00 2001 -From: Sasha Levin -Date: Mon, 5 Aug 2024 22:12:41 +0200 -Subject: ext4: don't set SB_RDONLY after filesystem errors - -From: Jan Kara - -[ Upstream commit d3476f3dad4ad68ae5f6b008ea6591d1520da5d8 ] - -When the filesystem is mounted with errors=remount-ro, we were setting -SB_RDONLY flag to stop all filesystem modifications. We knew this misses -proper locking (sb->s_umount) and does not go through proper filesystem -remount procedure but it has been the way this worked since early ext2 -days and it was good enough for catastrophic situation damage -mitigation. Recently, syzbot has found a way (see link) to trigger -warnings in filesystem freezing because the code got confused by -SB_RDONLY changing under its hands. Since these days we set -EXT4_FLAGS_SHUTDOWN on the superblock which is enough to stop all -filesystem modifications, modifying SB_RDONLY shouldn't be needed. So -stop doing that. - -Link: https://lore.kernel.org/all/000000000000b90a8e061e21d12f@google.com -Reported-by: Christian Brauner -Signed-off-by: Jan Kara -Reviewed-by: Christian Brauner -Link: https://patch.msgid.link/20240805201241.27286-1-jack@suse.cz -Signed-off-by: Theodore Ts'o -Signed-off-by: Sasha Levin ---- - fs/ext4/super.c | 9 +++++---- - 1 file changed, 5 insertions(+), 4 deletions(-) - -diff --git a/fs/ext4/super.c b/fs/ext4/super.c -index 3db39758486e9..3bf214d4afef5 100644 ---- a/fs/ext4/super.c -+++ b/fs/ext4/super.c -@@ -692,11 +692,12 @@ static void ext4_handle_error(struct super_block *sb, bool force_ro, int error, - - ext4_msg(sb, KERN_CRIT, "Remounting filesystem read-only"); - /* -- * Make sure updated value of ->s_mount_flags will be visible before -- * ->s_flags update -+ * EXT4_FLAGS_SHUTDOWN was set which stops all filesystem -+ * modifications. We don't set SB_RDONLY because that requires -+ * sb->s_umount semaphore and setting it without proper remount -+ * procedure is confusing code such as freeze_super() leading to -+ * deadlocks and other problems. - */ -- smp_wmb(); -- sb->s_flags |= SB_RDONLY; - } - - static void flush_stashed_error_work(struct work_struct *work) --- -2.43.0 - diff --git a/queue-6.1/series b/queue-6.1/series index 7e1f15a017c..567552dbe2f 100644 --- a/queue-6.1/series +++ b/queue-6.1/series @@ -503,7 +503,6 @@ drm-radeon-r100-handle-unknown-family-in-r100_cp_ini.patch drm-amd-pm-ensure-the-fw_info-is-not-null-before-usi.patch of-irq-refer-to-actual-buffer-size-in-of_irq_parse_o.patch powerpc-pseries-use-correct-data-types-from-pseries_.patch -ext4-don-t-set-sb_rdonly-after-filesystem-errors.patch ext4-ext4_search_dir-should-return-a-proper-error.patch ext4-avoid-use-after-free-in-ext4_ext_show_leaf.patch ext4-fix-i_data_sem-unlock-order-in-ext4_ind_migrate.patch diff --git a/queue-6.10/ext4-don-t-set-sb_rdonly-after-filesystem-errors.patch b/queue-6.10/ext4-don-t-set-sb_rdonly-after-filesystem-errors.patch deleted file mode 100644 index 4a655fbe222..00000000000 --- a/queue-6.10/ext4-don-t-set-sb_rdonly-after-filesystem-errors.patch +++ /dev/null @@ -1,56 +0,0 @@ -From 4fa00095d061d1115320ef696fdbfae86d5a88f1 Mon Sep 17 00:00:00 2001 -From: Sasha Levin -Date: Mon, 5 Aug 2024 22:12:41 +0200 -Subject: ext4: don't set SB_RDONLY after filesystem errors - -From: Jan Kara - -[ Upstream commit d3476f3dad4ad68ae5f6b008ea6591d1520da5d8 ] - -When the filesystem is mounted with errors=remount-ro, we were setting -SB_RDONLY flag to stop all filesystem modifications. We knew this misses -proper locking (sb->s_umount) and does not go through proper filesystem -remount procedure but it has been the way this worked since early ext2 -days and it was good enough for catastrophic situation damage -mitigation. Recently, syzbot has found a way (see link) to trigger -warnings in filesystem freezing because the code got confused by -SB_RDONLY changing under its hands. Since these days we set -EXT4_FLAGS_SHUTDOWN on the superblock which is enough to stop all -filesystem modifications, modifying SB_RDONLY shouldn't be needed. So -stop doing that. - -Link: https://lore.kernel.org/all/000000000000b90a8e061e21d12f@google.com -Reported-by: Christian Brauner -Signed-off-by: Jan Kara -Reviewed-by: Christian Brauner -Link: https://patch.msgid.link/20240805201241.27286-1-jack@suse.cz -Signed-off-by: Theodore Ts'o -Signed-off-by: Sasha Levin ---- - fs/ext4/super.c | 9 +++++---- - 1 file changed, 5 insertions(+), 4 deletions(-) - -diff --git a/fs/ext4/super.c b/fs/ext4/super.c -index edc692984404d..04b78c479fd7a 100644 ---- a/fs/ext4/super.c -+++ b/fs/ext4/super.c -@@ -735,11 +735,12 @@ static void ext4_handle_error(struct super_block *sb, bool force_ro, int error, - - ext4_msg(sb, KERN_CRIT, "Remounting filesystem read-only"); - /* -- * Make sure updated value of ->s_mount_flags will be visible before -- * ->s_flags update -+ * EXT4_FLAGS_SHUTDOWN was set which stops all filesystem -+ * modifications. We don't set SB_RDONLY because that requires -+ * sb->s_umount semaphore and setting it without proper remount -+ * procedure is confusing code such as freeze_super() leading to -+ * deadlocks and other problems. - */ -- smp_wmb(); -- sb->s_flags |= SB_RDONLY; - } - - static void update_super_work(struct work_struct *work) --- -2.43.0 - diff --git a/queue-6.10/ext4-fix-access-to-uninitialised-lock-in-fc-replay-path.patch b/queue-6.10/ext4-fix-access-to-uninitialised-lock-in-fc-replay-path.patch index 2773146167a..331aea0a562 100644 --- a/queue-6.10/ext4-fix-access-to-uninitialised-lock-in-fc-replay-path.patch +++ b/queue-6.10/ext4-fix-access-to-uninitialised-lock-in-fc-replay-path.patch @@ -57,7 +57,7 @@ Signed-off-by: Greg Kroah-Hartman --- a/fs/ext4/super.c +++ b/fs/ext4/super.c -@@ -5332,6 +5332,8 @@ static int __ext4_fill_super(struct fs_c +@@ -5331,6 +5331,8 @@ static int __ext4_fill_super(struct fs_c INIT_LIST_HEAD(&sbi->s_orphan); /* unlinked but open files */ mutex_init(&sbi->s_orphan_lock); @@ -66,7 +66,7 @@ Signed-off-by: Greg Kroah-Hartman ext4_fast_commit_init(sb); sb->s_root = NULL; -@@ -5553,7 +5555,6 @@ static int __ext4_fill_super(struct fs_c +@@ -5552,7 +5554,6 @@ static int __ext4_fill_super(struct fs_c * Save the original bdev mapping's wb_err value which could be * used to detect the metadata async write error. */ diff --git a/queue-6.10/ext4-fix-timer-use-after-free-on-failed-mount.patch b/queue-6.10/ext4-fix-timer-use-after-free-on-failed-mount.patch index fbcfa4cc059..0da345d74be 100644 --- a/queue-6.10/ext4-fix-timer-use-after-free-on-failed-mount.patch +++ b/queue-6.10/ext4-fix-timer-use-after-free-on-failed-mount.patch @@ -34,7 +34,7 @@ Signed-off-by: Greg Kroah-Hartman --- a/fs/ext4/super.c +++ b/fs/ext4/super.c -@@ -5633,8 +5633,8 @@ failed_mount3a: +@@ -5632,8 +5632,8 @@ failed_mount3a: failed_mount3: /* flush s_sb_upd_work before sbi destroy */ flush_work(&sbi->s_sb_upd_work); diff --git a/queue-6.10/series b/queue-6.10/series index 80930153fb1..c6436817da2 100644 --- a/queue-6.10/series +++ b/queue-6.10/series @@ -244,7 +244,6 @@ hid-i2c-hid-ensure-various-commands-do-not-interfere.patch ksmbd-add-refcnt-to-ksmbd_conn-struct.patch platform-mellanox-mlxbf-pmc-fix-lockdep-warning.patch platform-x86-x86-android-tablets-adjust-xiaomi-pad-2.patch -ext4-don-t-set-sb_rdonly-after-filesystem-errors.patch bpf-make-the-pointer-returned-by-iter-next-method-va.patch ext4-ext4_search_dir-should-return-a-proper-error.patch ext4-avoid-use-after-free-in-ext4_ext_show_leaf.patch diff --git a/queue-6.11/ext4-don-t-set-sb_rdonly-after-filesystem-errors.patch b/queue-6.11/ext4-don-t-set-sb_rdonly-after-filesystem-errors.patch deleted file mode 100644 index 7b9da5f12ff..00000000000 --- a/queue-6.11/ext4-don-t-set-sb_rdonly-after-filesystem-errors.patch +++ /dev/null @@ -1,56 +0,0 @@ -From 822e36f1bec439e66e5a268cf5f05536cd783021 Mon Sep 17 00:00:00 2001 -From: Sasha Levin -Date: Mon, 5 Aug 2024 22:12:41 +0200 -Subject: ext4: don't set SB_RDONLY after filesystem errors - -From: Jan Kara - -[ Upstream commit d3476f3dad4ad68ae5f6b008ea6591d1520da5d8 ] - -When the filesystem is mounted with errors=remount-ro, we were setting -SB_RDONLY flag to stop all filesystem modifications. We knew this misses -proper locking (sb->s_umount) and does not go through proper filesystem -remount procedure but it has been the way this worked since early ext2 -days and it was good enough for catastrophic situation damage -mitigation. Recently, syzbot has found a way (see link) to trigger -warnings in filesystem freezing because the code got confused by -SB_RDONLY changing under its hands. Since these days we set -EXT4_FLAGS_SHUTDOWN on the superblock which is enough to stop all -filesystem modifications, modifying SB_RDONLY shouldn't be needed. So -stop doing that. - -Link: https://lore.kernel.org/all/000000000000b90a8e061e21d12f@google.com -Reported-by: Christian Brauner -Signed-off-by: Jan Kara -Reviewed-by: Christian Brauner -Link: https://patch.msgid.link/20240805201241.27286-1-jack@suse.cz -Signed-off-by: Theodore Ts'o -Signed-off-by: Sasha Levin ---- - fs/ext4/super.c | 9 +++++---- - 1 file changed, 5 insertions(+), 4 deletions(-) - -diff --git a/fs/ext4/super.c b/fs/ext4/super.c -index cecea19908109..b3f47d6879ebf 100644 ---- a/fs/ext4/super.c -+++ b/fs/ext4/super.c -@@ -735,11 +735,12 @@ static void ext4_handle_error(struct super_block *sb, bool force_ro, int error, - - ext4_msg(sb, KERN_CRIT, "Remounting filesystem read-only"); - /* -- * Make sure updated value of ->s_mount_flags will be visible before -- * ->s_flags update -+ * EXT4_FLAGS_SHUTDOWN was set which stops all filesystem -+ * modifications. We don't set SB_RDONLY because that requires -+ * sb->s_umount semaphore and setting it without proper remount -+ * procedure is confusing code such as freeze_super() leading to -+ * deadlocks and other problems. - */ -- smp_wmb(); -- sb->s_flags |= SB_RDONLY; - } - - static void update_super_work(struct work_struct *work) --- -2.43.0 - diff --git a/queue-6.11/ext4-fix-access-to-uninitialised-lock-in-fc-replay-path.patch b/queue-6.11/ext4-fix-access-to-uninitialised-lock-in-fc-replay-path.patch index 7ed5532882c..1492944ab79 100644 --- a/queue-6.11/ext4-fix-access-to-uninitialised-lock-in-fc-replay-path.patch +++ b/queue-6.11/ext4-fix-access-to-uninitialised-lock-in-fc-replay-path.patch @@ -57,7 +57,7 @@ Signed-off-by: Greg Kroah-Hartman --- a/fs/ext4/super.c +++ b/fs/ext4/super.c -@@ -5334,6 +5334,8 @@ static int __ext4_fill_super(struct fs_c +@@ -5333,6 +5333,8 @@ static int __ext4_fill_super(struct fs_c INIT_LIST_HEAD(&sbi->s_orphan); /* unlinked but open files */ mutex_init(&sbi->s_orphan_lock); @@ -66,7 +66,7 @@ Signed-off-by: Greg Kroah-Hartman ext4_fast_commit_init(sb); sb->s_root = NULL; -@@ -5555,7 +5557,6 @@ static int __ext4_fill_super(struct fs_c +@@ -5554,7 +5556,6 @@ static int __ext4_fill_super(struct fs_c * Save the original bdev mapping's wb_err value which could be * used to detect the metadata async write error. */ diff --git a/queue-6.11/ext4-fix-error-message-when-rejecting-the-default-ha.patch b/queue-6.11/ext4-fix-error-message-when-rejecting-the-default-ha.patch index aafb648fc37..3e4b7ffdf56 100644 --- a/queue-6.11/ext4-fix-error-message-when-rejecting-the-default-ha.patch +++ b/queue-6.11/ext4-fix-error-message-when-rejecting-the-default-ha.patch @@ -22,15 +22,13 @@ Link: https://patch.msgid.link/87jzg1en6j.fsf_-_@mailhost.krisman.be Signed-off-by: Theodore Ts'o Signed-off-by: Sasha Levin --- - fs/ext4/ext4.h | 1 + - fs/ext4/super.c | 27 +++++++++++++++++---------- + fs/ext4/ext4.h | 1 + + fs/ext4/super.c | 27 +++++++++++++++++---------- 2 files changed, 18 insertions(+), 10 deletions(-) -diff --git a/fs/ext4/ext4.h b/fs/ext4/ext4.h -index 08acd152261ed..8bd302392d759 100644 --- a/fs/ext4/ext4.h +++ b/fs/ext4/ext4.h -@@ -2462,6 +2462,7 @@ static inline __le16 ext4_rec_len_to_disk(unsigned len, unsigned blocksize) +@@ -2462,6 +2462,7 @@ static inline __le16 ext4_rec_len_to_dis #define DX_HASH_HALF_MD4_UNSIGNED 4 #define DX_HASH_TEA_UNSIGNED 5 #define DX_HASH_SIPHASH 6 @@ -38,11 +36,9 @@ index 08acd152261ed..8bd302392d759 100644 static inline u32 ext4_chksum(struct ext4_sb_info *sbi, u32 crc, const void *address, unsigned int length) -diff --git a/fs/ext4/super.c b/fs/ext4/super.c -index b3f47d6879ebf..1cd4e20cc320d 100644 --- a/fs/ext4/super.c +++ b/fs/ext4/super.c -@@ -3583,13 +3583,6 @@ int ext4_feature_set_ok(struct super_block *sb, int readonly) +@@ -3582,13 +3582,6 @@ int ext4_feature_set_ok(struct super_blo "mounted without CONFIG_UNICODE"); return 0; } @@ -56,7 +52,7 @@ index b3f47d6879ebf..1cd4e20cc320d 100644 if (readonly) return 1; -@@ -5095,16 +5088,27 @@ static int ext4_load_super(struct super_block *sb, ext4_fsblk_t *lsb, +@@ -5094,16 +5087,27 @@ out: return ret; } @@ -86,7 +82,7 @@ index b3f47d6879ebf..1cd4e20cc320d 100644 if (ext4_has_feature_dir_index(sb)) { i = le32_to_cpu(es->s_flags); if (i & EXT2_FLAGS_UNSIGNED_HASH) -@@ -5122,6 +5126,7 @@ static void ext4_hash_info_init(struct super_block *sb) +@@ -5121,6 +5125,7 @@ static void ext4_hash_info_init(struct s #endif } } @@ -94,7 +90,7 @@ index b3f47d6879ebf..1cd4e20cc320d 100644 } static int ext4_block_group_meta_init(struct super_block *sb, int silent) -@@ -5269,7 +5274,9 @@ static int __ext4_fill_super(struct fs_context *fc, struct super_block *sb) +@@ -5268,7 +5273,9 @@ static int __ext4_fill_super(struct fs_c if (err) goto failed_mount; @@ -105,6 +101,3 @@ index b3f47d6879ebf..1cd4e20cc320d 100644 err = ext4_handle_clustersize(sb); if (err) --- -2.43.0 - diff --git a/queue-6.11/ext4-fix-timer-use-after-free-on-failed-mount.patch b/queue-6.11/ext4-fix-timer-use-after-free-on-failed-mount.patch index 8798367a4b1..ef96a6503c8 100644 --- a/queue-6.11/ext4-fix-timer-use-after-free-on-failed-mount.patch +++ b/queue-6.11/ext4-fix-timer-use-after-free-on-failed-mount.patch @@ -34,7 +34,7 @@ Signed-off-by: Greg Kroah-Hartman --- a/fs/ext4/super.c +++ b/fs/ext4/super.c -@@ -5635,8 +5635,8 @@ failed_mount3a: +@@ -5634,8 +5634,8 @@ failed_mount3a: failed_mount3: /* flush s_sb_upd_work before sbi destroy */ flush_work(&sbi->s_sb_upd_work); diff --git a/queue-6.11/series b/queue-6.11/series index 71a408ba528..6d3c1cd2c43 100644 --- a/queue-6.11/series +++ b/queue-6.11/series @@ -300,7 +300,6 @@ ksmbd-add-refcnt-to-ksmbd_conn-struct.patch platform-mellanox-mlxbf-pmc-fix-lockdep-warning.patch platform-x86-x86-android-tablets-adjust-xiaomi-pad-2.patch ext4-filesystems-without-casefold-feature-cannot-be-.patch -ext4-don-t-set-sb_rdonly-after-filesystem-errors.patch bpf-make-the-pointer-returned-by-iter-next-method-va.patch ext4-ext4_search_dir-should-return-a-proper-error.patch ext4-avoid-use-after-free-in-ext4_ext_show_leaf.patch diff --git a/queue-6.6/ext4-don-t-set-sb_rdonly-after-filesystem-errors.patch b/queue-6.6/ext4-don-t-set-sb_rdonly-after-filesystem-errors.patch deleted file mode 100644 index c6a5449c47a..00000000000 --- a/queue-6.6/ext4-don-t-set-sb_rdonly-after-filesystem-errors.patch +++ /dev/null @@ -1,56 +0,0 @@ -From 72f6c5e53e252ae7488abe45ab29488a4696002b Mon Sep 17 00:00:00 2001 -From: Sasha Levin -Date: Mon, 5 Aug 2024 22:12:41 +0200 -Subject: ext4: don't set SB_RDONLY after filesystem errors - -From: Jan Kara - -[ Upstream commit d3476f3dad4ad68ae5f6b008ea6591d1520da5d8 ] - -When the filesystem is mounted with errors=remount-ro, we were setting -SB_RDONLY flag to stop all filesystem modifications. We knew this misses -proper locking (sb->s_umount) and does not go through proper filesystem -remount procedure but it has been the way this worked since early ext2 -days and it was good enough for catastrophic situation damage -mitigation. Recently, syzbot has found a way (see link) to trigger -warnings in filesystem freezing because the code got confused by -SB_RDONLY changing under its hands. Since these days we set -EXT4_FLAGS_SHUTDOWN on the superblock which is enough to stop all -filesystem modifications, modifying SB_RDONLY shouldn't be needed. So -stop doing that. - -Link: https://lore.kernel.org/all/000000000000b90a8e061e21d12f@google.com -Reported-by: Christian Brauner -Signed-off-by: Jan Kara -Reviewed-by: Christian Brauner -Link: https://patch.msgid.link/20240805201241.27286-1-jack@suse.cz -Signed-off-by: Theodore Ts'o -Signed-off-by: Sasha Levin ---- - fs/ext4/super.c | 9 +++++---- - 1 file changed, 5 insertions(+), 4 deletions(-) - -diff --git a/fs/ext4/super.c b/fs/ext4/super.c -index 46c4f75049791..53ead0650fc8a 100644 ---- a/fs/ext4/super.c -+++ b/fs/ext4/super.c -@@ -744,11 +744,12 @@ static void ext4_handle_error(struct super_block *sb, bool force_ro, int error, - - ext4_msg(sb, KERN_CRIT, "Remounting filesystem read-only"); - /* -- * Make sure updated value of ->s_mount_flags will be visible before -- * ->s_flags update -+ * EXT4_FLAGS_SHUTDOWN was set which stops all filesystem -+ * modifications. We don't set SB_RDONLY because that requires -+ * sb->s_umount semaphore and setting it without proper remount -+ * procedure is confusing code such as freeze_super() leading to -+ * deadlocks and other problems. - */ -- smp_wmb(); -- sb->s_flags |= SB_RDONLY; - } - - static void update_super_work(struct work_struct *work) --- -2.43.0 - diff --git a/queue-6.6/ext4-fix-timer-use-after-free-on-failed-mount.patch b/queue-6.6/ext4-fix-timer-use-after-free-on-failed-mount.patch index 828db25ac76..b42d3699d8c 100644 --- a/queue-6.6/ext4-fix-timer-use-after-free-on-failed-mount.patch +++ b/queue-6.6/ext4-fix-timer-use-after-free-on-failed-mount.patch @@ -34,7 +34,7 @@ Signed-off-by: Greg Kroah-Hartman --- a/fs/ext4/super.c +++ b/fs/ext4/super.c -@@ -5659,8 +5659,8 @@ failed_mount3a: +@@ -5658,8 +5658,8 @@ failed_mount3a: failed_mount3: /* flush s_sb_upd_work before sbi destroy */ flush_work(&sbi->s_sb_upd_work); diff --git a/queue-6.6/series b/queue-6.6/series index 543f3e1579f..de40d917aea 100644 --- a/queue-6.6/series +++ b/queue-6.6/series @@ -173,7 +173,6 @@ drm-amdgpu-gfx11-use-rlc-safe-mode-for-soft-recovery.patch drm-amdgpu-gfx10-use-rlc-safe-mode-for-soft-recovery.patch platform-x86-lenovo-ymc-ignore-the-0x0-state.patch ksmbd-add-refcnt-to-ksmbd_conn-struct.patch -ext4-don-t-set-sb_rdonly-after-filesystem-errors.patch bpf-make-the-pointer-returned-by-iter-next-method-va.patch ext4-ext4_search_dir-should-return-a-proper-error.patch ext4-avoid-use-after-free-in-ext4_ext_show_leaf.patch