]> git.baikalelectronics.ru Git - kernel.git/commit
perf stat: Fix NULL pointer dereference
authorHongbo Yao <yaohongbo@huawei.com>
Fri, 5 Jun 2020 09:17:40 +0000 (17:17 +0800)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Tue, 9 Jun 2020 15:40:04 +0000 (12:40 -0300)
commit490e5a61d3981304e22304e20140abf3947aa456
tree2a02fe882746ae1d97a1c72e84989e9a38ef4407
parent47585dffa448e9b594ca1ee2bba3353a4b6c4982
perf stat: Fix NULL pointer dereference

If config->aggr_map is NULL and config->aggr_get_id is not NULL,
the function print_aggr() will still calling arrg_update_shadow(),
which can result in accessing the invalid pointer.

Fixes: 4fe3ee16b9dd ("perf stat: Move the display functions to stat-display.c")
Signed-off-by: Hongbo Yao <yaohongbo@huawei.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Wei Li <liwei391@huawei.com>
Link: https://lore.kernel.org/lkml/20200608163625.GC3073@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/util/stat-display.c