+++ /dev/null
-From 0813299c586b175d7edb25f56412c54b812d0379 Mon Sep 17 00:00:00 2001
-From: Jan Kara <jack@suse.cz>
-Date: Thu, 26 Jan 2023 12:22:21 +0100
-Subject: ext4: Fix possible corruption when moving a directory
-
-From: Jan Kara <jack@suse.cz>
-
-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 <jack@suse.cz>
-Link: https://lore.kernel.org/r/20230126112221.11866-1-jack@suse.cz
-Signed-off-by: Theodore Ts'o <tytso@mit.edu>
-Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
----
- 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);
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
+++ /dev/null
-From 0813299c586b175d7edb25f56412c54b812d0379 Mon Sep 17 00:00:00 2001
-From: Jan Kara <jack@suse.cz>
-Date: Thu, 26 Jan 2023 12:22:21 +0100
-Subject: ext4: Fix possible corruption when moving a directory
-
-From: Jan Kara <jack@suse.cz>
-
-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 <jack@suse.cz>
-Link: https://lore.kernel.org/r/20230126112221.11866-1-jack@suse.cz
-Signed-off-by: Theodore Ts'o <tytso@mit.edu>
-Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
----
- 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);
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
+++ /dev/null
-From 0813299c586b175d7edb25f56412c54b812d0379 Mon Sep 17 00:00:00 2001
-From: Jan Kara <jack@suse.cz>
-Date: Thu, 26 Jan 2023 12:22:21 +0100
-Subject: ext4: Fix possible corruption when moving a directory
-
-From: Jan Kara <jack@suse.cz>
-
-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 <jack@suse.cz>
-Link: https://lore.kernel.org/r/20230126112221.11866-1-jack@suse.cz
-Signed-off-by: Theodore Ts'o <tytso@mit.edu>
-Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
----
- 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);
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
+++ /dev/null
-From 0813299c586b175d7edb25f56412c54b812d0379 Mon Sep 17 00:00:00 2001
-From: Jan Kara <jack@suse.cz>
-Date: Thu, 26 Jan 2023 12:22:21 +0100
-Subject: ext4: Fix possible corruption when moving a directory
-
-From: Jan Kara <jack@suse.cz>
-
-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 <jack@suse.cz>
-Link: https://lore.kernel.org/r/20230126112221.11866-1-jack@suse.cz
-Signed-off-by: Theodore Ts'o <tytso@mit.edu>
-Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
----
- 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);
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
+++ /dev/null
-From 0813299c586b175d7edb25f56412c54b812d0379 Mon Sep 17 00:00:00 2001
-From: Jan Kara <jack@suse.cz>
-Date: Thu, 26 Jan 2023 12:22:21 +0100
-Subject: ext4: Fix possible corruption when moving a directory
-
-From: Jan Kara <jack@suse.cz>
-
-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 <jack@suse.cz>
-Link: https://lore.kernel.org/r/20230126112221.11866-1-jack@suse.cz
-Signed-off-by: Theodore Ts'o <tytso@mit.edu>
-Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
----
- 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);
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
+++ /dev/null
-From 0813299c586b175d7edb25f56412c54b812d0379 Mon Sep 17 00:00:00 2001
-From: Jan Kara <jack@suse.cz>
-Date: Thu, 26 Jan 2023 12:22:21 +0100
-Subject: ext4: Fix possible corruption when moving a directory
-
-From: Jan Kara <jack@suse.cz>
-
-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 <jack@suse.cz>
-Link: https://lore.kernel.org/r/20230126112221.11866-1-jack@suse.cz
-Signed-off-by: Theodore Ts'o <tytso@mit.edu>
-Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
----
- 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);
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
+++ /dev/null
-From 0813299c586b175d7edb25f56412c54b812d0379 Mon Sep 17 00:00:00 2001
-From: Jan Kara <jack@suse.cz>
-Date: Thu, 26 Jan 2023 12:22:21 +0100
-Subject: ext4: Fix possible corruption when moving a directory
-
-From: Jan Kara <jack@suse.cz>
-
-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 <jack@suse.cz>
-Link: https://lore.kernel.org/r/20230126112221.11866-1-jack@suse.cz
-Signed-off-by: Theodore Ts'o <tytso@mit.edu>
-Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
----
- 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);
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