diff options
| author | hupu <[email protected]> | 2025-09-10 08:16:55 +0000 |
|---|---|---|
| committer | Namhyung Kim <[email protected]> | 2025-09-13 00:51:35 +0000 |
| commit | a5edf3550f4260504b7e0ab3d40d13ffe924b773 (patch) | |
| tree | e1eef70cf334bb3d60b11238dd1d03cdc23cf911 /fs/btrfs/delayed-inode.c | |
| parent | perf symbol-elf: Add support for the block argument for libbfd (diff) | |
| download | kernel-a5edf3550f4260504b7e0ab3d40d13ffe924b773.tar.gz kernel-a5edf3550f4260504b7e0ab3d40d13ffe924b773.zip | |
perf subcmd: avoid crash in exclude_cmds when excludes is empty
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 <[email protected]>
Reported-by: Guilherme Amadio <[email protected]>
Reviewed-by: Namhyung Kim <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Namhyung Kim <[email protected]>
Diffstat (limited to 'fs/btrfs/delayed-inode.c')
0 files changed, 0 insertions, 0 deletions
