This is a note to let you know that I've just added the patch titled perf disasm: Fix not cleaning up disasm_line in symbol__disassemble_raw() to the 6.12-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: perf-disasm-fix-not-cleaning-up-disasm_line-in-symbo.patch and it can be found in the queue-6.12 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. commit 653ffa1afe42ae3c2b540a956c47fb002d92537f Author: Li Huafei <lihuafei1@xxxxxxxxxx> Date: Sat Oct 19 23:41:57 2024 +0800 perf disasm: Fix not cleaning up disasm_line in symbol__disassemble_raw() [ Upstream commit 150dab31d5609f896fbfaa06b442ca314da79858 ] In symbol__disassemble_raw(), the created disasm_line should be discarded before returning an error. When creating disasm_line fails, break the loop and then release the created lines. Fixes: 0b971e6bf1c3 ("perf annotate: Add support to capture and parse raw instruction in powerpc using dso__data_read_offset utility") Signed-off-by: Li Huafei <lihuafei1@xxxxxxxxxx> Tested-by: Athira Rajeev <atrajeev@xxxxxxxxxxxxxxxxxx> Cc: sesse@xxxxxxxxxx Cc: kjain@xxxxxxxxxxxxx Link: https://lore.kernel.org/r/20241019154157.282038-3-lihuafei1@xxxxxxxxxx Signed-off-by: Namhyung Kim <namhyung@xxxxxxxxxx> Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx> diff --git a/tools/perf/util/disasm.c b/tools/perf/util/disasm.c index 5d5fcc4dee078..648e8d87ef194 100644 --- a/tools/perf/util/disasm.c +++ b/tools/perf/util/disasm.c @@ -1785,7 +1785,7 @@ static int symbol__disassemble_raw(char *filename, struct symbol *sym, sprintf(args->line, "%x", line[i]); dl = disasm_line__new(args); if (dl == NULL) - goto err; + break; annotation_line__add(&dl->al, ¬es->src->source); offset += 4;