Adrian Hunter 41aeefb7e5 perf intel-pt: Fix segfault in intel_pt_print_info() with uClibc
commit 5a3d47071f0ced0431ef82a5fb6bd077ed9493db 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: 11fa7cb86b56d361 ("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:15:48 +02:00
..
2016-07-18 19:42:47 -03:00
2016-06-28 10:54:56 -03:00
2016-07-12 15:19:47 -03:00
2016-07-12 15:19:47 -03:00
2016-10-03 11:24:13 -03:00
2019-11-12 19:15:43 +01:00
2021-07-28 09:14:27 +02:00
2019-08-25 10:51:21 +02:00
2019-08-25 10:51:21 +02:00
2016-06-15 10:35:27 -03:00
2016-06-15 10:35:27 -03:00
2016-07-12 15:19:55 -03:00
2016-07-12 15:19:55 -03:00
2021-06-03 08:23:27 +02:00
2016-10-03 11:24:13 -03:00
2017-07-15 12:16:12 +02:00
2016-03-31 10:52:24 -03:00
2016-03-23 12:32:31 -03:00