]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
6.12-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 17 Oct 2025 07:04:04 +0000 (09:04 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 17 Oct 2025 07:04:04 +0000 (09:04 +0200)
added patches:
ext4-free-orphan-info-with-kvfree.patch

queue-6.12/ext4-free-orphan-info-with-kvfree.patch [new file with mode: 0644]
queue-6.12/series

diff --git a/queue-6.12/ext4-free-orphan-info-with-kvfree.patch b/queue-6.12/ext4-free-orphan-info-with-kvfree.patch
new file mode 100644 (file)
index 0000000..3eaef32
--- /dev/null
@@ -0,0 +1,43 @@
+From 971843c511c3c2f6eda96c6b03442913bfee6148 Mon Sep 17 00:00:00 2001
+From: Jan Kara <jack@suse.cz>
+Date: Tue, 7 Oct 2025 15:49:37 +0200
+Subject: ext4: free orphan info with kvfree
+
+From: Jan Kara <jack@suse.cz>
+
+commit 971843c511c3c2f6eda96c6b03442913bfee6148 upstream.
+
+Orphan info is now getting allocated with kvmalloc_array(). Free it with
+kvfree() instead of kfree() to avoid complaints from mm.
+
+Reported-by: Chris Mason <clm@meta.com>
+Fixes: 0a6ce20c1564 ("ext4: verify orphan file size is not too big")
+Cc: stable@vger.kernel.org
+Signed-off-by: Jan Kara <jack@suse.cz>
+Message-ID: <20251007134936.7291-2-jack@suse.cz>
+Signed-off-by: Theodore Ts'o <tytso@mit.edu>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ fs/ext4/orphan.c |    4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+--- a/fs/ext4/orphan.c
++++ b/fs/ext4/orphan.c
+@@ -513,7 +513,7 @@ void ext4_release_orphan_info(struct sup
+               return;
+       for (i = 0; i < oi->of_blocks; i++)
+               brelse(oi->of_binfo[i].ob_bh);
+-      kfree(oi->of_binfo);
++      kvfree(oi->of_binfo);
+ }
+ static struct ext4_orphan_block_tail *ext4_orphan_block_tail(
+@@ -638,7 +638,7 @@ int ext4_init_orphan_info(struct super_b
+ out_free:
+       for (i--; i >= 0; i--)
+               brelse(oi->of_binfo[i].ob_bh);
+-      kfree(oi->of_binfo);
++      kvfree(oi->of_binfo);
+ out_put:
+       iput(inode);
+       return ret;
index cb8d75d7256b312b1a2b22b90a4450b15751d362..b7013f797ccc4ee8ca42ffbedb2984a29306df1f 100644 (file)
@@ -218,3 +218,4 @@ ext4-fix-an-off-by-one-issue-during-moving-extents.patch
 ext4-guard-against-ea-inode-refcount-underflow-in-xattr-update.patch
 ext4-validate-ea_ino-and-size-in-check_xattrs.patch
 acpica-allow-to-skip-global-lock-initialization.patch
+ext4-free-orphan-info-with-kvfree.patch