linux-stable/tools
Adrian Hunter b5dc2f2578 perf intel-pt: Fix segfault in intel_pt_print_info() with uClibc
commit 5a3d47071f upstream.

uClibc segfaulted because NULL was passed as the format to fprintf().

That happened because one of the format strings was missing and
intel_pt_print_info() didn't check that before calling fprintf().

Add the missing format string, and check format is not NULL before calling
fprintf().

Fixes: 11fa7cb86b ("perf tools: Pass Intel PT information for decoding MTC and CYC")
Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Acked-by: Namhyung Kim <namhyung@kernel.org>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Ian Rogers <irogers@google.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/20221012082259.22394-2-adrian.hunter@intel.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-10-26 13:25:54 +02:00
..
accounting
arch
bootconfig
bpf bpftool: Clear errno after libcap's checks 2022-10-26 13:25:45 +02:00
build tools build: Switch to new openssl API for test-libcrypto 2022-08-25 11:38:01 +02:00
cgroup
debugging
edid
firewire
firmware
gpio
hv
iio
include tools/include/uapi: Fix <asm/errno.h> for parisc and xtensa 2022-09-23 14:16:58 +02:00
io_uring
kvm/kvm_stat
laptop
leds
lib selftests/xsk: Avoid use-after-free on ctx 2022-10-26 13:25:20 +02:00
memory-model
objtool objtool: Preserve special st_shndx indexes in elf_update_symbol 2022-10-26 13:25:18 +02:00
pci
pcmcia
perf perf intel-pt: Fix segfault in intel_pt_print_info() with uClibc 2022-10-26 13:25:54 +02:00
power
scripts
spi
testing kselftest/arm64: Fix validatation termination record after EXTRA_CONTEXT 2022-10-26 13:25:51 +02:00
thermal/tmon tools/thermal: Fix possible path truncations 2022-08-21 15:16:12 +02:00
time
usb
virtio
vm tools/vm/slabinfo: use alphabetic order when two values are equal 2022-08-25 11:38:00 +02:00
wmi
Makefile