linux-stable/tools
Ian Rogers cf95808632 perf stat: Avoid metric-only segv
[ Upstream commit 2543947c77 ]

Cycles is recognized as part of a hard coded metric in stat-shadow.c,
it may call print_metric_only with a NULL fmt string leading to a
segfault. Handle the NULL fmt explicitly.

Fixes: 088519f318 ("perf stat: Move the display functions to stat-display.c")
Signed-off-by: Ian Rogers <irogers@google.com>
Reviewed-by: Kan Liang <kan.liang@linux.intel.com>
Cc: K Prateek Nayak <kprateek.nayak@amd.com>
Cc: James Clark <james.clark@arm.com>
Cc: Kaige Ye <ye@kaige.org>
Cc: John Garry <john.g.garry@oracle.com>
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Link: https://lore.kernel.org/r/20240209204947.3873294-4-irogers@google.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-03-26 18:22:20 -04:00
..
accounting
arch x86/bugs: Increase the x86 bugs vector size to two u32s 2023-08-08 19:56:37 +02:00
bpf bpftool: Fix bug for long instructions in program CFG dumps 2023-05-17 11:35:42 +02:00
build tools features: Add feature test to check if libbfd has buildid support 2023-09-23 11:00:05 +02:00
cgroup
debugging
firewire
firmware
gpio
hv
iio tools: iio: iio_generic_buffer ensure alignment 2023-11-20 10:30:14 +01:00
include tools headers UAPI: Sync linux/perf_event.h with the kernel sources 2023-12-13 18:18:17 +01:00
io_uring
kvm/kvm_stat
laptop
leds
lib libsubcmd: Fix memory leak in uniq() 2024-02-23 08:25:03 +01:00
memory-model
nfsd
objtool objtool: Add a missing comma to avoid string concatenation 2023-02-06 07:52:49 +01:00
pci
pcmcia
perf perf stat: Avoid metric-only segv 2024-03-26 18:22:20 -04:00
power tools/power/turbostat: Fix a knl bug 2023-11-28 16:50:17 +00:00
scripts tools: Allow proper CC/CXX/... override with LLVM=1 in Makefile.include 2021-07-31 08:19:37 +02:00
spi
testing selftests: tls: use exact comparison in recv_partial 2024-03-26 18:22:12 -04:00
thermal/tmon tools/thermal: Fix possible path truncations 2022-08-25 11:18:09 +02:00
time
usb usb: testusb: Fix for showing the connection speed 2021-10-09 14:39:49 +02:00
virtio tools/virtio: fix the vringh test for virtio ring changes 2023-02-22 12:50:34 +01:00
vm tools/vm/slabinfo-gnuplot: use "grep -E" instead of "egrep" 2022-12-08 11:23:04 +01:00
wmi
Makefile