]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
6.1-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 13 Jul 2025 14:22:56 +0000 (16:22 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 13 Jul 2025 14:22:56 +0000 (16:22 +0200)
added patches:
kallsyms-fix-build-without-execinfo.patch
maple_tree-fix-mt_destroy_walk-on-root-leaf-node.patch

queue-6.1/kallsyms-fix-build-without-execinfo.patch [new file with mode: 0644]
queue-6.1/maple_tree-fix-mt_destroy_walk-on-root-leaf-node.patch [new file with mode: 0644]
queue-6.1/series

diff --git a/queue-6.1/kallsyms-fix-build-without-execinfo.patch b/queue-6.1/kallsyms-fix-build-without-execinfo.patch
new file mode 100644 (file)
index 0000000..9ab8b82
--- /dev/null
@@ -0,0 +1,53 @@
+From a95743b53031b015e8949e845a9f6fdfb2656347 Mon Sep 17 00:00:00 2001
+From: Achill Gilgenast <fossdd@pwned.life>
+Date: Sun, 22 Jun 2025 03:45:49 +0200
+Subject: kallsyms: fix build without execinfo
+
+From: Achill Gilgenast <fossdd@pwned.life>
+
+commit a95743b53031b015e8949e845a9f6fdfb2656347 upstream.
+
+Some libc's like musl libc don't provide execinfo.h since it's not part of
+POSIX.  In order to fix compilation on musl, only include execinfo.h if
+available (HAVE_BACKTRACE_SUPPORT)
+
+This was discovered with c104c16073b7 ("Kunit to check the longest symbol
+length") which starts to include linux/kallsyms.h with Alpine Linux'
+configs.
+
+Link: https://lkml.kernel.org/r/20250622014608.448718-1-fossdd@pwned.life
+Fixes: c104c16073b7 ("Kunit to check the longest symbol length")
+Signed-off-by: Achill Gilgenast <fossdd@pwned.life>
+Cc: Luis Henriques <luis@igalia.com>
+Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+Cc: <stable@vger.kernel.org>
+Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ tools/include/linux/kallsyms.h | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/tools/include/linux/kallsyms.h b/tools/include/linux/kallsyms.h
+index 5a37ccbec54f..f61a01dd7eb7 100644
+--- a/tools/include/linux/kallsyms.h
++++ b/tools/include/linux/kallsyms.h
+@@ -18,6 +18,7 @@ static inline const char *kallsyms_lookup(unsigned long addr,
+       return NULL;
+ }
++#ifdef HAVE_BACKTRACE_SUPPORT
+ #include <execinfo.h>
+ #include <stdlib.h>
+ static inline void print_ip_sym(const char *loglvl, unsigned long ip)
+@@ -30,5 +31,8 @@ static inline void print_ip_sym(const char *loglvl, unsigned long ip)
+       free(name);
+ }
++#else
++static inline void print_ip_sym(const char *loglvl, unsigned long ip) {}
++#endif
+ #endif
+-- 
+2.50.1
+
diff --git a/queue-6.1/maple_tree-fix-mt_destroy_walk-on-root-leaf-node.patch b/queue-6.1/maple_tree-fix-mt_destroy_walk-on-root-leaf-node.patch
new file mode 100644 (file)
index 0000000..b1535b4
--- /dev/null
@@ -0,0 +1,40 @@
+From ea9b77f98d94c4d5c1bd1ac1db078f78b40e8bf5 Mon Sep 17 00:00:00 2001
+From: Wei Yang <richard.weiyang@gmail.com>
+Date: Tue, 24 Jun 2025 15:18:40 -0400
+Subject: maple_tree: fix mt_destroy_walk() on root leaf node
+
+From: Wei Yang <richard.weiyang@gmail.com>
+
+commit ea9b77f98d94c4d5c1bd1ac1db078f78b40e8bf5 upstream.
+
+On destroy, we should set each node dead.  But current code miss this when
+the maple tree has only the root node.
+
+The reason is mt_destroy_walk() leverage mte_destroy_descend() to set node
+dead, but this is skipped since the only root node is a leaf.
+
+Fixes this by setting the node dead if it is a leaf.
+
+Link: https://lore.kernel.org/all/20250407231354.11771-1-richard.weiyang@gmail.com/
+Link: https://lkml.kernel.org/r/20250624191841.64682-1-Liam.Howlett@oracle.com
+Fixes: 54a611b60590 ("Maple Tree: add new data structure")
+Signed-off-by: Wei Yang <richard.weiyang@gmail.com>
+Signed-off-by: Liam R. Howlett <Liam.Howlett@oracle.com>
+Reviewed-by: Dev Jain <dev.jain@arm.com>
+Cc: <stable@vger.kernel.org>
+Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ lib/maple_tree.c |    1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/lib/maple_tree.c
++++ b/lib/maple_tree.c
+@@ -5619,6 +5619,7 @@ static void mt_destroy_walk(struct maple
+       struct maple_enode *start;
+       if (mte_is_leaf(enode)) {
++              mte_set_node_dead(enode);
+               node->type = mte_node_type(enode);
+               goto free_leaf;
+       }
index a7721ddb1ff7a3a029d3de41baf88bb4562b7991..3464facfef1d1c4170d23ef1fb7f4442a1ab528b 100644 (file)
@@ -35,3 +35,5 @@ drm-ttm-fix-error-handling-in-ttm_buffer_object_transfer.patch
 drm-gem-fix-race-in-drm_gem_handle_create_tail.patch
 usb-gadget-u_serial-fix-race-condition-in-tty-wakeup.patch
 revert-acpi-battery-negate-current-when-discharging.patch
+kallsyms-fix-build-without-execinfo.patch
+maple_tree-fix-mt_destroy_walk-on-root-leaf-node.patch