From: Greg Kroah-Hartman Date: Sun, 13 Jul 2025 14:22:56 +0000 (+0200) Subject: 6.1-stable patches X-Git-Tag: v5.15.188~33 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=b669205b35a2487d75553f171f3380a83ce29f4b;p=thirdparty%2Fkernel%2Fstable-queue.git 6.1-stable patches added patches: kallsyms-fix-build-without-execinfo.patch maple_tree-fix-mt_destroy_walk-on-root-leaf-node.patch --- 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 index 0000000000..9ab8b8277c --- /dev/null +++ b/queue-6.1/kallsyms-fix-build-without-execinfo.patch @@ -0,0 +1,53 @@ +From a95743b53031b015e8949e845a9f6fdfb2656347 Mon Sep 17 00:00:00 2001 +From: Achill Gilgenast +Date: Sun, 22 Jun 2025 03:45:49 +0200 +Subject: kallsyms: fix build without execinfo + +From: Achill Gilgenast + +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 +Cc: Luis Henriques +Cc: Greg Kroah-Hartman +Cc: +Signed-off-by: Andrew Morton +Signed-off-by: Greg Kroah-Hartman +--- + 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 + #include + 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 index 0000000000..b1535b4064 --- /dev/null +++ b/queue-6.1/maple_tree-fix-mt_destroy_walk-on-root-leaf-node.patch @@ -0,0 +1,40 @@ +From ea9b77f98d94c4d5c1bd1ac1db078f78b40e8bf5 Mon Sep 17 00:00:00 2001 +From: Wei Yang +Date: Tue, 24 Jun 2025 15:18:40 -0400 +Subject: maple_tree: fix mt_destroy_walk() on root leaf node + +From: Wei Yang + +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 +Signed-off-by: Liam R. Howlett +Reviewed-by: Dev Jain +Cc: +Signed-off-by: Andrew Morton +Signed-off-by: Greg Kroah-Hartman +--- + 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; + } diff --git a/queue-6.1/series b/queue-6.1/series index a7721ddb1f..3464facfef 100644 --- a/queue-6.1/series +++ b/queue-6.1/series @@ -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