linux/tools/perf/arch
Ian Rogers 77c08fedf3 perf annotate: Fix args leak of map_symbol
[ Upstream commit 00419892ba ]

map_symbol__exit() needs calling on an annotate_args.ms, however, rather
than introduce proper reference count handling to symbol__annotate()
just switch to passing the map_symbol pointer parameter around, making
the puts the caller's responsibility.

Fix a number of cases to ensure the map in a map_symbol has a
reference count increment and add the then necessary map_symbol_exits.

Fixes: 56e144fe98 ("perf mem_info: Add and use map_symbol__exit and addr_map_symbol__exit")
Reviewed-by: James Clark <james.clark@linaro.org>
Signed-off-by: Ian Rogers <irogers@google.com>
Cc: Aditya Bodkhe <aditya.b1@linux.ibm.com>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Albert Ou <aou@eecs.berkeley.edu>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Alexandre Ghiti <alex@ghiti.fr>
Cc: Athira Rajeev <atrajeev@linux.ibm.com>
Cc: Bill Wendling <morbo@google.com>
Cc: Dr. David Alan Gilbert <linux@treblig.org>
Cc: Guo Ren <guoren@kernel.org>
Cc: Howard Chu <howardchu95@gmail.com>
Cc: Ian Rogers <irogers@google.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: John Garry <john.g.garry@oracle.com>
Cc: Julia Lawall <Julia.Lawall@inria.fr>
Cc: Justin Stitt <justinstitt@google.com>
Cc: Krzysztof Łopatowski <krzysztof.m.lopatowski@gmail.com>
Cc: Leo Yan <leo.yan@linux.dev>
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-csky@vger.kernel.org
Cc: linux-riscv@lists.infradead.org
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Nathan Chancellor <nathan@kernel.org>
Cc: Nick Desaulniers <nick.desaulniers+lkml@gmail.com>
Cc: Palmer Dabbelt <palmer@dabbelt.com>
Cc: Paul Walmsley <pjw@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Sergei Trofimovich <slyich@gmail.com>
Cc: Shimin Guo <shimin.guo@skydio.com>
Cc: Suchit Karunakaran <suchitkarunakaran@gmail.com>
Cc: Thomas Falcon <thomas.falcon@intel.com>
Cc: Tianyou Li <tianyou.li@intel.com>
Cc: Will Deacon <will@kernel.org>
Cc: Zecheng Li <zecheng@google.com>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
History 2026-03-04 07:19:25 -05:00
..
alpha perf build: Remove Makefile.syscalls 2025-03-20 22:58:20 -07:00
arc/annotate perf build: Remove Makefile.syscalls 2025-03-20 22:58:20 -07:00
arm tools headers: Sync syscall tables with the kernel source 2025-08-18 13:49:25 -07:00
arm64 perf arm_spe: Add "event_filter" entry in meta data 2025-09-19 12:14:28 -03:00
csky perf build: Remove Makefile.syscalls 2025-03-20 22:58:20 -07:00
loongarch perf annotate: Fix args leak of map_symbol 2026-03-04 07:19:25 -05:00
mips tools headers: Sync syscall tables with the kernel source 2025-08-18 13:49:25 -07:00
parisc perf build: Remove Makefile.syscalls 2025-03-20 22:58:20 -07:00
powerpc perf powerpc: Add basic CONFIG_AUXTRACE support for VPA pmu on powerpc 2025-10-01 11:22:04 -03:00
riscv RISC-V: perf/kvm: Add reporting of interrupt events 2025-07-28 22:28:25 +05:30
riscv64/annotate perf disasm: Add e_machine/e_flags to struct arch 2024-11-09 08:39:13 -08:00
s390 perf annotate: Fix args leak of map_symbol 2026-03-04 07:19:25 -05:00
sh tools headers: Sync syscall tables with the kernel source 2025-08-18 13:49:25 -07:00
sparc tools headers: Sync syscall tables with the kernel source 2025-08-18 13:49:25 -07:00
x86 tools headers x86: Sync table due to introducion of uprobe syscall 2025-11-01 13:04:20 -03:00
xtensa tools headers: Sync syscall tables with the kernel source 2025-08-18 13:49:25 -07:00
Build perf util: Make util its own library 2024-06-26 11:07:42 -07:00
common.c perf tools riscv: Add support for riscv lookup_binutils_path 2023-05-12 15:21:48 -03:00
common.h perf annotate: Own objdump_path and disassembler_style strings 2023-04-04 09:39:56 -03:00