From: Greg Kroah-Hartman Date: Wed, 8 Mar 2023 07:18:31 +0000 (+0100) Subject: drop ext4 patch from everywhere X-Git-Tag: v6.2.3~25 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=75defcd46719deefc98a447d83729dbe3c2e2805;p=thirdparty%2Fkernel%2Fstable-queue.git drop ext4 patch from everywhere --- diff --git a/queue-4.14/ext4-fix-possible-corruption-when-moving-a-directory.patch b/queue-4.14/ext4-fix-possible-corruption-when-moving-a-directory.patch deleted file mode 100644 index 478bbad6f70..00000000000 --- a/queue-4.14/ext4-fix-possible-corruption-when-moving-a-directory.patch +++ /dev/null @@ -1,54 +0,0 @@ -From 0813299c586b175d7edb25f56412c54b812d0379 Mon Sep 17 00:00:00 2001 -From: Jan Kara -Date: Thu, 26 Jan 2023 12:22:21 +0100 -Subject: ext4: Fix possible corruption when moving a directory - -From: Jan Kara - -commit 0813299c586b175d7edb25f56412c54b812d0379 upstream. - -When we are renaming a directory to a different directory, we need to -update '..' entry in the moved directory. However nothing prevents moved -directory from being modified and even converted from the inline format -to the normal format. When such race happens the rename code gets -confused and we crash. Fix the problem by locking the moved directory. - -CC: stable@vger.kernel.org -Fixes: 32f7f22c0b52 ("ext4: let ext4_rename handle inline dir") -Signed-off-by: Jan Kara -Link: https://lore.kernel.org/r/20230126112221.11866-1-jack@suse.cz -Signed-off-by: Theodore Ts'o -Signed-off-by: Greg Kroah-Hartman ---- - fs/ext4/namei.c | 11 ++++++++++- - 1 file changed, 10 insertions(+), 1 deletion(-) - ---- a/fs/ext4/namei.c -+++ b/fs/ext4/namei.c -@@ -3754,9 +3754,16 @@ static int ext4_rename(struct inode *old - if (new.dir != old.dir && EXT4_DIR_LINK_MAX(new.dir)) - goto end_rename; - } -+ /* -+ * We need to protect against old.inode directory getting -+ * converted from inline directory format into a normal one. -+ */ -+ inode_lock_nested(old.inode, I_MUTEX_NONDIR2); - retval = ext4_rename_dir_prepare(handle, &old); -- if (retval) -+ if (retval) { -+ inode_unlock(old.inode); - goto end_rename; -+ } - } - /* - * If we're renaming a file within an inline_data dir and adding or -@@ -3852,6 +3859,8 @@ end_rename: - } else { - ext4_journal_stop(handle); - } -+ if (old.dir_bh) -+ inode_unlock(old.inode); - release_bh: - brelse(old.dir_bh); - brelse(old.bh); diff --git a/queue-4.14/series b/queue-4.14/series index 53532d98bb8..4bb585e478e 100644 --- a/queue-4.14/series +++ b/queue-4.14/series @@ -127,7 +127,6 @@ irqdomain-drop-bogus-fwspec-mapping-error-handling.patch alsa-ice1712-do-not-left-ice-gpio_mutex-locked-in-aureon_add_controls.patch ext4-optimize-ea_inode-block-expansion.patch ext4-refuse-to-create-ea-block-when-umounted.patch -ext4-fix-possible-corruption-when-moving-a-directory.patch wifi-rtl8xxxu-use-a-longer-retry-limit-of-48.patch wifi-cfg80211-fix-use-after-free-for-wext.patch dm-flakey-fix-logic-when-corrupting-a-bio.patch diff --git a/queue-4.19/ext4-fix-possible-corruption-when-moving-a-directory.patch b/queue-4.19/ext4-fix-possible-corruption-when-moving-a-directory.patch deleted file mode 100644 index 2216c2cbcc3..00000000000 --- a/queue-4.19/ext4-fix-possible-corruption-when-moving-a-directory.patch +++ /dev/null @@ -1,54 +0,0 @@ -From 0813299c586b175d7edb25f56412c54b812d0379 Mon Sep 17 00:00:00 2001 -From: Jan Kara -Date: Thu, 26 Jan 2023 12:22:21 +0100 -Subject: ext4: Fix possible corruption when moving a directory - -From: Jan Kara - -commit 0813299c586b175d7edb25f56412c54b812d0379 upstream. - -When we are renaming a directory to a different directory, we need to -update '..' entry in the moved directory. However nothing prevents moved -directory from being modified and even converted from the inline format -to the normal format. When such race happens the rename code gets -confused and we crash. Fix the problem by locking the moved directory. - -CC: stable@vger.kernel.org -Fixes: 32f7f22c0b52 ("ext4: let ext4_rename handle inline dir") -Signed-off-by: Jan Kara -Link: https://lore.kernel.org/r/20230126112221.11866-1-jack@suse.cz -Signed-off-by: Theodore Ts'o -Signed-off-by: Greg Kroah-Hartman ---- - fs/ext4/namei.c | 11 ++++++++++- - 1 file changed, 10 insertions(+), 1 deletion(-) - ---- a/fs/ext4/namei.c -+++ b/fs/ext4/namei.c -@@ -3736,9 +3736,16 @@ static int ext4_rename(struct inode *old - if (new.dir != old.dir && EXT4_DIR_LINK_MAX(new.dir)) - goto end_rename; - } -+ /* -+ * We need to protect against old.inode directory getting -+ * converted from inline directory format into a normal one. -+ */ -+ inode_lock_nested(old.inode, I_MUTEX_NONDIR2); - retval = ext4_rename_dir_prepare(handle, &old); -- if (retval) -+ if (retval) { -+ inode_unlock(old.inode); - goto end_rename; -+ } - } - /* - * If we're renaming a file within an inline_data dir and adding or -@@ -3834,6 +3841,8 @@ end_rename: - } else { - ext4_journal_stop(handle); - } -+ if (old.dir_bh) -+ inode_unlock(old.inode); - release_bh: - brelse(old.dir_bh); - brelse(old.bh); diff --git a/queue-4.19/series b/queue-4.19/series index e02dc138797..b8895602242 100644 --- a/queue-4.19/series +++ b/queue-4.19/series @@ -171,7 +171,6 @@ irqdomain-drop-bogus-fwspec-mapping-error-handling.patch alsa-ice1712-do-not-left-ice-gpio_mutex-locked-in-aureon_add_controls.patch ext4-optimize-ea_inode-block-expansion.patch ext4-refuse-to-create-ea-block-when-umounted.patch -ext4-fix-possible-corruption-when-moving-a-directory.patch wifi-rtl8xxxu-use-a-longer-retry-limit-of-48.patch wifi-cfg80211-fix-use-after-free-for-wext.patch dm-flakey-fix-logic-when-corrupting-a-bio.patch diff --git a/queue-5.10/ext4-fix-possible-corruption-when-moving-a-directory.patch b/queue-5.10/ext4-fix-possible-corruption-when-moving-a-directory.patch deleted file mode 100644 index c5e56757cf1..00000000000 --- a/queue-5.10/ext4-fix-possible-corruption-when-moving-a-directory.patch +++ /dev/null @@ -1,54 +0,0 @@ -From 0813299c586b175d7edb25f56412c54b812d0379 Mon Sep 17 00:00:00 2001 -From: Jan Kara -Date: Thu, 26 Jan 2023 12:22:21 +0100 -Subject: ext4: Fix possible corruption when moving a directory - -From: Jan Kara - -commit 0813299c586b175d7edb25f56412c54b812d0379 upstream. - -When we are renaming a directory to a different directory, we need to -update '..' entry in the moved directory. However nothing prevents moved -directory from being modified and even converted from the inline format -to the normal format. When such race happens the rename code gets -confused and we crash. Fix the problem by locking the moved directory. - -CC: stable@vger.kernel.org -Fixes: 32f7f22c0b52 ("ext4: let ext4_rename handle inline dir") -Signed-off-by: Jan Kara -Link: https://lore.kernel.org/r/20230126112221.11866-1-jack@suse.cz -Signed-off-by: Theodore Ts'o -Signed-off-by: Greg Kroah-Hartman ---- - fs/ext4/namei.c | 11 ++++++++++- - 1 file changed, 10 insertions(+), 1 deletion(-) - ---- a/fs/ext4/namei.c -+++ b/fs/ext4/namei.c -@@ -3922,9 +3922,16 @@ static int ext4_rename(struct inode *old - if (new.dir != old.dir && EXT4_DIR_LINK_MAX(new.dir)) - goto end_rename; - } -+ /* -+ * We need to protect against old.inode directory getting -+ * converted from inline directory format into a normal one. -+ */ -+ inode_lock_nested(old.inode, I_MUTEX_NONDIR2); - retval = ext4_rename_dir_prepare(handle, &old); -- if (retval) -+ if (retval) { -+ inode_unlock(old.inode); - goto end_rename; -+ } - } - /* - * If we're renaming a file within an inline_data dir and adding or -@@ -4049,6 +4056,8 @@ end_rename: - } else { - ext4_journal_stop(handle); - } -+ if (old.dir_bh) -+ inode_unlock(old.inode); - release_bh: - brelse(old.dir_bh); - brelse(old.bh); diff --git a/queue-5.10/series b/queue-5.10/series index b6af2c3b5dc..32b01d25dd2 100644 --- a/queue-5.10/series +++ b/queue-5.10/series @@ -383,7 +383,6 @@ alsa-hda-realtek-add-quirk-for-hp-elitedesk-800-g6-tower-pc.patch jbd2-fix-data-missing-when-reusing-bh-which-is-ready-to-be-checkpointed.patch ext4-optimize-ea_inode-block-expansion.patch ext4-refuse-to-create-ea-block-when-umounted.patch -ext4-fix-possible-corruption-when-moving-a-directory.patch mtd-spi-nor-fix-shift-out-of-bounds-in-spi_nor_set_erase_type.patch dm-add-cond_resched-to-dm_wq_work.patch wifi-rtl8xxxu-use-a-longer-retry-limit-of-48.patch diff --git a/queue-5.15/ext4-fix-possible-corruption-when-moving-a-directory.patch b/queue-5.15/ext4-fix-possible-corruption-when-moving-a-directory.patch deleted file mode 100644 index 3d4572f7834..00000000000 --- a/queue-5.15/ext4-fix-possible-corruption-when-moving-a-directory.patch +++ /dev/null @@ -1,54 +0,0 @@ -From 0813299c586b175d7edb25f56412c54b812d0379 Mon Sep 17 00:00:00 2001 -From: Jan Kara -Date: Thu, 26 Jan 2023 12:22:21 +0100 -Subject: ext4: Fix possible corruption when moving a directory - -From: Jan Kara - -commit 0813299c586b175d7edb25f56412c54b812d0379 upstream. - -When we are renaming a directory to a different directory, we need to -update '..' entry in the moved directory. However nothing prevents moved -directory from being modified and even converted from the inline format -to the normal format. When such race happens the rename code gets -confused and we crash. Fix the problem by locking the moved directory. - -CC: stable@vger.kernel.org -Fixes: 32f7f22c0b52 ("ext4: let ext4_rename handle inline dir") -Signed-off-by: Jan Kara -Link: https://lore.kernel.org/r/20230126112221.11866-1-jack@suse.cz -Signed-off-by: Theodore Ts'o -Signed-off-by: Greg Kroah-Hartman ---- - fs/ext4/namei.c | 11 ++++++++++- - 1 file changed, 10 insertions(+), 1 deletion(-) - ---- a/fs/ext4/namei.c -+++ b/fs/ext4/namei.c -@@ -3886,9 +3886,16 @@ static int ext4_rename(struct user_names - if (new.dir != old.dir && EXT4_DIR_LINK_MAX(new.dir)) - goto end_rename; - } -+ /* -+ * We need to protect against old.inode directory getting -+ * converted from inline directory format into a normal one. -+ */ -+ inode_lock_nested(old.inode, I_MUTEX_NONDIR2); - retval = ext4_rename_dir_prepare(handle, &old); -- if (retval) -+ if (retval) { -+ inode_unlock(old.inode); - goto end_rename; -+ } - } - /* - * If we're renaming a file within an inline_data dir and adding or -@@ -4013,6 +4020,8 @@ end_rename: - } else { - ext4_journal_stop(handle); - } -+ if (old.dir_bh) -+ inode_unlock(old.inode); - release_bh: - brelse(old.dir_bh); - brelse(old.bh); diff --git a/queue-5.15/series b/queue-5.15/series index ccfa025b970..0ab685860fc 100644 --- a/queue-5.15/series +++ b/queue-5.15/series @@ -497,7 +497,6 @@ alsa-hda-realtek-add-quirk-for-hp-elitedesk-800-g6-tower-pc.patch jbd2-fix-data-missing-when-reusing-bh-which-is-ready-to-be-checkpointed.patch ext4-optimize-ea_inode-block-expansion.patch ext4-refuse-to-create-ea-block-when-umounted.patch -ext4-fix-possible-corruption-when-moving-a-directory.patch mtd-spi-nor-sfdp-fix-index-value-for-sccr-dwords.patch mtd-spi-nor-spansion-consider-reserved-bits-in-cfr5-register.patch mtd-spi-nor-fix-shift-out-of-bounds-in-spi_nor_set_erase_type.patch diff --git a/queue-5.4/ext4-fix-possible-corruption-when-moving-a-directory.patch b/queue-5.4/ext4-fix-possible-corruption-when-moving-a-directory.patch deleted file mode 100644 index bc21341250e..00000000000 --- a/queue-5.4/ext4-fix-possible-corruption-when-moving-a-directory.patch +++ /dev/null @@ -1,54 +0,0 @@ -From 0813299c586b175d7edb25f56412c54b812d0379 Mon Sep 17 00:00:00 2001 -From: Jan Kara -Date: Thu, 26 Jan 2023 12:22:21 +0100 -Subject: ext4: Fix possible corruption when moving a directory - -From: Jan Kara - -commit 0813299c586b175d7edb25f56412c54b812d0379 upstream. - -When we are renaming a directory to a different directory, we need to -update '..' entry in the moved directory. However nothing prevents moved -directory from being modified and even converted from the inline format -to the normal format. When such race happens the rename code gets -confused and we crash. Fix the problem by locking the moved directory. - -CC: stable@vger.kernel.org -Fixes: 32f7f22c0b52 ("ext4: let ext4_rename handle inline dir") -Signed-off-by: Jan Kara -Link: https://lore.kernel.org/r/20230126112221.11866-1-jack@suse.cz -Signed-off-by: Theodore Ts'o -Signed-off-by: Greg Kroah-Hartman ---- - fs/ext4/namei.c | 11 ++++++++++- - 1 file changed, 10 insertions(+), 1 deletion(-) - ---- a/fs/ext4/namei.c -+++ b/fs/ext4/namei.c -@@ -3854,9 +3854,16 @@ static int ext4_rename(struct inode *old - if (new.dir != old.dir && EXT4_DIR_LINK_MAX(new.dir)) - goto end_rename; - } -+ /* -+ * We need to protect against old.inode directory getting -+ * converted from inline directory format into a normal one. -+ */ -+ inode_lock_nested(old.inode, I_MUTEX_NONDIR2); - retval = ext4_rename_dir_prepare(handle, &old); -- if (retval) -+ if (retval) { -+ inode_unlock(old.inode); - goto end_rename; -+ } - } - /* - * If we're renaming a file within an inline_data dir and adding or -@@ -3952,6 +3959,8 @@ end_rename: - } else { - ext4_journal_stop(handle); - } -+ if (old.dir_bh) -+ inode_unlock(old.inode); - release_bh: - brelse(old.dir_bh); - brelse(old.bh); diff --git a/queue-5.4/series b/queue-5.4/series index 02b5a1f90af..67ed46d74d5 100644 --- a/queue-5.4/series +++ b/queue-5.4/series @@ -251,7 +251,6 @@ alsa-ice1712-do-not-left-ice-gpio_mutex-locked-in-aureon_add_controls.patch alsa-hda-realtek-add-quirk-for-hp-elitedesk-800-g6-tower-pc.patch ext4-optimize-ea_inode-block-expansion.patch ext4-refuse-to-create-ea-block-when-umounted.patch -ext4-fix-possible-corruption-when-moving-a-directory.patch wifi-rtl8xxxu-use-a-longer-retry-limit-of-48.patch wifi-cfg80211-fix-use-after-free-for-wext.patch thermal-intel-powerclamp-fix-cur_state-for-multi-package-system.patch diff --git a/queue-6.1/ext4-fix-possible-corruption-when-moving-a-directory.patch b/queue-6.1/ext4-fix-possible-corruption-when-moving-a-directory.patch deleted file mode 100644 index 31fd5675ba8..00000000000 --- a/queue-6.1/ext4-fix-possible-corruption-when-moving-a-directory.patch +++ /dev/null @@ -1,54 +0,0 @@ -From 0813299c586b175d7edb25f56412c54b812d0379 Mon Sep 17 00:00:00 2001 -From: Jan Kara -Date: Thu, 26 Jan 2023 12:22:21 +0100 -Subject: ext4: Fix possible corruption when moving a directory - -From: Jan Kara - -commit 0813299c586b175d7edb25f56412c54b812d0379 upstream. - -When we are renaming a directory to a different directory, we need to -update '..' entry in the moved directory. However nothing prevents moved -directory from being modified and even converted from the inline format -to the normal format. When such race happens the rename code gets -confused and we crash. Fix the problem by locking the moved directory. - -CC: stable@vger.kernel.org -Fixes: 32f7f22c0b52 ("ext4: let ext4_rename handle inline dir") -Signed-off-by: Jan Kara -Link: https://lore.kernel.org/r/20230126112221.11866-1-jack@suse.cz -Signed-off-by: Theodore Ts'o -Signed-off-by: Greg Kroah-Hartman ---- - fs/ext4/namei.c | 11 ++++++++++- - 1 file changed, 10 insertions(+), 1 deletion(-) - ---- a/fs/ext4/namei.c -+++ b/fs/ext4/namei.c -@@ -3872,9 +3872,16 @@ static int ext4_rename(struct user_names - if (new.dir != old.dir && EXT4_DIR_LINK_MAX(new.dir)) - goto end_rename; - } -+ /* -+ * We need to protect against old.inode directory getting -+ * converted from inline directory format into a normal one. -+ */ -+ inode_lock_nested(old.inode, I_MUTEX_NONDIR2); - retval = ext4_rename_dir_prepare(handle, &old); -- if (retval) -+ if (retval) { -+ inode_unlock(old.inode); - goto end_rename; -+ } - } - /* - * If we're renaming a file within an inline_data dir and adding or -@@ -4006,6 +4013,8 @@ end_rename: - } else { - ext4_journal_stop(handle); - } -+ if (old.dir_bh) -+ inode_unlock(old.inode); - release_bh: - brelse(old.dir_bh); - brelse(old.bh); diff --git a/queue-6.1/series b/queue-6.1/series index 66040c855fd..ca0c282b842 100644 --- a/queue-6.1/series +++ b/queue-6.1/series @@ -785,7 +785,6 @@ alsa-hda-realtek-add-quirk-for-hp-elitedesk-800-g6-tower-pc.patch jbd2-fix-data-missing-when-reusing-bh-which-is-ready-to-be-checkpointed.patch ext4-optimize-ea_inode-block-expansion.patch ext4-refuse-to-create-ea-block-when-umounted.patch -ext4-fix-possible-corruption-when-moving-a-directory.patch cxl-pmem-fix-nvdimm-registration-races.patch mtd-spi-nor-sfdp-fix-index-value-for-sccr-dwords.patch mtd-spi-nor-spansion-consider-reserved-bits-in-cfr5-register.patch diff --git a/queue-6.2/ext4-fix-possible-corruption-when-moving-a-directory.patch b/queue-6.2/ext4-fix-possible-corruption-when-moving-a-directory.patch deleted file mode 100644 index 31fd5675ba8..00000000000 --- a/queue-6.2/ext4-fix-possible-corruption-when-moving-a-directory.patch +++ /dev/null @@ -1,54 +0,0 @@ -From 0813299c586b175d7edb25f56412c54b812d0379 Mon Sep 17 00:00:00 2001 -From: Jan Kara -Date: Thu, 26 Jan 2023 12:22:21 +0100 -Subject: ext4: Fix possible corruption when moving a directory - -From: Jan Kara - -commit 0813299c586b175d7edb25f56412c54b812d0379 upstream. - -When we are renaming a directory to a different directory, we need to -update '..' entry in the moved directory. However nothing prevents moved -directory from being modified and even converted from the inline format -to the normal format. When such race happens the rename code gets -confused and we crash. Fix the problem by locking the moved directory. - -CC: stable@vger.kernel.org -Fixes: 32f7f22c0b52 ("ext4: let ext4_rename handle inline dir") -Signed-off-by: Jan Kara -Link: https://lore.kernel.org/r/20230126112221.11866-1-jack@suse.cz -Signed-off-by: Theodore Ts'o -Signed-off-by: Greg Kroah-Hartman ---- - fs/ext4/namei.c | 11 ++++++++++- - 1 file changed, 10 insertions(+), 1 deletion(-) - ---- a/fs/ext4/namei.c -+++ b/fs/ext4/namei.c -@@ -3872,9 +3872,16 @@ static int ext4_rename(struct user_names - if (new.dir != old.dir && EXT4_DIR_LINK_MAX(new.dir)) - goto end_rename; - } -+ /* -+ * We need to protect against old.inode directory getting -+ * converted from inline directory format into a normal one. -+ */ -+ inode_lock_nested(old.inode, I_MUTEX_NONDIR2); - retval = ext4_rename_dir_prepare(handle, &old); -- if (retval) -+ if (retval) { -+ inode_unlock(old.inode); - goto end_rename; -+ } - } - /* - * If we're renaming a file within an inline_data dir and adding or -@@ -4006,6 +4013,8 @@ end_rename: - } else { - ext4_journal_stop(handle); - } -+ if (old.dir_bh) -+ inode_unlock(old.inode); - release_bh: - brelse(old.dir_bh); - brelse(old.bh); diff --git a/queue-6.2/series b/queue-6.2/series index 7fa76b31881..4674380eede 100644 --- a/queue-6.2/series +++ b/queue-6.2/series @@ -891,7 +891,6 @@ alsa-hda-realtek-add-quirk-for-hp-elitedesk-800-g6-tower-pc.patch jbd2-fix-data-missing-when-reusing-bh-which-is-ready-to-be-checkpointed.patch ext4-optimize-ea_inode-block-expansion.patch ext4-refuse-to-create-ea-block-when-umounted.patch -ext4-fix-possible-corruption-when-moving-a-directory.patch cxl-pmem-fix-nvdimm-registration-races.patch input-exc3000-properly-stop-timer-on-shutdown.patch mtd-spi-nor-sfdp-fix-index-value-for-sccr-dwords.patch