android_kernel_motorola_sm6375/tools
Repository files (latest commit first)
Filename Latest commit message Latest commit date
hupu e58778d9c8 perf subcmd: avoid crash in exclude_cmds when excludes is empty
[ Upstream commit a5edf3550f4260504b7e0ab3d40d13ffe924b773 ]

When cross-compiling the perf tool for ARM64, `perf help` may crash
with the following assertion failure:

  help.c:122: exclude_cmds: Assertion `cmds->names[ci] == NULL' failed.

This happens when the perf binary is not named exactly "perf" or when
multiple "perf-*" binaries exist in the same directory. In such cases,
the `excludes` command list can be empty, which leads to the final
assertion in exclude_cmds() being triggered.

Add a simple guard at the beginning of exclude_cmds() to return early
if excludes->cnt is zero, preventing the crash.

Signed-off-by: hupu <hupu.gm@gmail.com>
Reported-by: Guilherme Amadio <amadio@gentoo.org>
Reviewed-by: Namhyung Kim <namhyung@kernel.org>
Link: https://lore.kernel.org/r/20250909094953.106706-1-amadio@gentoo.org
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2025-10-29 13:59:45 +01:00
..
accounting
arch x86/insn: Fix PUSH instruction in x86 instruction decoder opcode map 2024-06-16 13:28:39 +02:00
bpf bpftool: Fix memory leak in dump_xx_nlmsg on realloc failure 2025-08-28 16:21:19 +02:00
build tools/build: Don't pass test log files to linker 2025-06-04 14:32:30 +02:00
cgroup
debugging
firewire
firmware
gpio
hv
iio tools/iio: Add memory allocation failure check for trigger_name 2024-11-08 16:20:45 +01:00
include tools: move alignment-related macros to new <linux/align.h> 2024-09-04 13:15:02 +02:00
io_uring
kvm/kvm_stat
laptop
leds
lib perf subcmd: avoid crash in exclude_cmds when excludes is empty 2025-10-29 13:59:45 +01:00
memory-model tools/memory-model: Fix bug in lock.cat 2024-08-19 05:33:37 +02:00
nfsd
objtool objtool: Add support for intra-function calls 2024-04-13 12:51:29 +02:00
pci
pcmcia
perf perf tests bp_account: Fix leaked file descriptor 2025-08-28 16:21:20 +02:00
power pm: cpupower: Fix the snapshot-order of tsc,mperf, clock in mperf_stop() 2025-08-28 16:21:25 +02:00
scripts
spi
testing act_mirred: use the backlog for nested calls to mirred ingress 2025-08-28 16:21:36 +02:00
thermal/tmon
time
usb usbip: tools: Fix detach_port() invalid port error path 2024-11-08 16:20:53 +01:00
virtio
vm
wmi
Makefile