From: Greg Kroah-Hartman Date: Wed, 22 Jul 2026 12:49:01 +0000 (+0200) Subject: 7.1-stable patches X-Git-Url: http://git.ipfire.org/gitweb/index.cgi?a=commitdiff_plain;h=391666f0414acb1666062f8ec4b239d2e0049b45;p=thirdparty%2Fkernel%2Fstable-queue.git 7.1-stable patches added patches: perf-srcline-introduce-inline_node__clear_frames.patch --- diff --git a/queue-7.1/perf-libdw-fix-libdw-api-contract-violations-and-mem.patch b/queue-7.1/perf-libdw-fix-libdw-api-contract-violations-and-mem.patch index 736ee8032e..aed75b11c1 100644 --- a/queue-7.1/perf-libdw-fix-libdw-api-contract-violations-and-mem.patch +++ b/queue-7.1/perf-libdw-fix-libdw-api-contract-violations-and-mem.patch @@ -36,14 +36,12 @@ Cc: Zecheng Li Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: Sasha Levin --- - tools/perf/util/libdw.c | 49 ++++++++++++++++++++++++++++++++++++----- + tools/perf/util/libdw.c | 49 ++++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 43 insertions(+), 6 deletions(-) -diff --git a/tools/perf/util/libdw.c b/tools/perf/util/libdw.c -index 21697788410308..15bf646d104f5a 100644 --- a/tools/perf/util/libdw.c +++ b/tools/perf/util/libdw.c -@@ -60,7 +60,10 @@ struct Dwfl *dso__libdw_dwfl(struct dso *dso) +@@ -60,7 +60,10 @@ struct Dwfl *dso__libdw_dwfl(struct dso return NULL; } @@ -77,7 +75,7 @@ index 21697788410308..15bf646d104f5a 100644 /* Assign caller information to the parent. */ if (call_fname) -@@ -103,12 +107,27 @@ static int libdw_a2l_cb(Dwarf_Die *die, void *_args) +@@ -103,12 +107,27 @@ static int libdw_a2l_cb(Dwarf_Die *die, /* Add this symbol to the chain as the leaf. */ if (!args->leaf_srcline_used) { @@ -107,7 +105,7 @@ index 21697788410308..15bf646d104f5a 100644 } int libdw__addr2line(u64 addr, char **file, unsigned int *line_nr, -@@ -162,11 +181,29 @@ int libdw__addr2line(u64 addr, char **file, unsigned int *line_nr, +@@ -162,11 +181,29 @@ int libdw__addr2line(u64 addr, char **fi .leaf_srcline = srcline_from_fileline(src ?: "", lineno), }; @@ -138,6 +136,3 @@ index 21697788410308..15bf646d104f5a 100644 } return 1; } --- -2.53.0 - diff --git a/queue-7.1/perf-srcline-introduce-inline_node__clear_frames.patch b/queue-7.1/perf-srcline-introduce-inline_node__clear_frames.patch new file mode 100644 index 0000000000..c7367aca9e --- /dev/null +++ b/queue-7.1/perf-srcline-introduce-inline_node__clear_frames.patch @@ -0,0 +1,67 @@ +From 674dea094ef6594ea1aa0efb074a4646a81350b2 Mon Sep 17 00:00:00 2001 +From: Ian Rogers +Date: Mon, 4 May 2026 01:12:21 -0700 +Subject: perf srcline: Introduce inline_node__clear_frames() + +From: Ian Rogers + +commit 674dea094ef6594ea1aa0efb074a4646a81350b2 upstream. + +Introduce inline_node__clear_frames() to clean up partial allocations. +This is a prerequisite for error handling in libdw inline unwinding. + +Signed-off-by: Ian Rogers +Cc: Adrian Hunter +Cc: Ingo Molnar +Cc: James Clark +Cc: Jiri Olsa +Cc: Masami Hiramatsu +Cc: Namhyung Kim +Cc: Peter Zijlstra +Cc: Zecheng Li +Signed-off-by: Arnaldo Carvalho de Melo +Signed-off-by: Greg Kroah-Hartman +--- + tools/perf/util/srcline.c | 9 ++++++++- + tools/perf/util/srcline.h | 1 + + 2 files changed, 9 insertions(+), 1 deletion(-) + +--- a/tools/perf/util/srcline.c ++++ b/tools/perf/util/srcline.c +@@ -429,10 +429,13 @@ struct inline_node *dso__parse_addr_inli + return addr2inlines(dso_name, addr, dso, sym); + } + +-void inline_node__delete(struct inline_node *node) ++void inline_node__clear_frames(struct inline_node *node) + { + struct inline_list *ilist, *tmp; + ++ if (node == NULL) ++ return; ++ + list_for_each_entry_safe(ilist, tmp, &node->val, list) { + list_del_init(&ilist->list); + zfree_srcline(&ilist->srcline); +@@ -441,7 +444,11 @@ void inline_node__delete(struct inline_n + symbol__delete(ilist->symbol); + free(ilist); + } ++} + ++void inline_node__delete(struct inline_node *node) ++{ ++ inline_node__clear_frames(node); + free(node); + } + +--- a/tools/perf/util/srcline.h ++++ b/tools/perf/util/srcline.h +@@ -47,6 +47,7 @@ struct inline_node *dso__parse_addr_inli + struct symbol *sym); + /* free resources associated to the inline node list */ + void inline_node__delete(struct inline_node *node); ++void inline_node__clear_frames(struct inline_node *node); + + /* insert the inline node list into the DSO, which will take ownership */ + void inlines__tree_insert(struct rb_root_cached *tree, diff --git a/queue-7.1/series b/queue-7.1/series index 1660c73ee7..ec91ab0e7b 100644 --- a/queue-7.1/series +++ b/queue-7.1/series @@ -834,6 +834,7 @@ staging-rtl8723bs-fix-stainfo-check-in-rtw_aes_decry.patch staging-nvec-fix-use-after-free-in-nvec_rx_completed.patch perf-dwarf-aux-fix-libdw-segmentation-fault-in-cu_wa.patch perf-dwarf-aux-fix-libdw-api-contract-violations.patch +perf-srcline-introduce-inline_node__clear_frames.patch perf-libdw-fix-libdw-api-contract-violations-and-mem.patch perf-probe-finder-fix-libdw-api-contract-violations.patch perf-annotate-data-fix-libdw-api-contract-violations.patch