]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
perf jevents: Free the sys_event_tables list after processing entries
authorLike Xu <likexu@tencent.com>
Tue, 28 Sep 2021 10:29:38 +0000 (18:29 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 13 Oct 2021 07:41:58 +0000 (09:41 +0200)
commit37e2d7fe11ae61fd78396066efe9ca88a5ecb5c1
tree3a42985eab6bee9de88245b979046aee752ca2a7
parent72e9a1bf9b722628c28092e0c2cd8717edd201dc
perf jevents: Free the sys_event_tables list after processing entries

[ Upstream commit b94729919db2c6737501c36ea6526a36d5d63fa2 ]

The compiler reports that free_sys_event_tables() is dead code.

But according to the semantics, the "LIST_HEAD(sys_event_tables)" should
also be released, just like we do with 'arch_std_events' in main().

Fixes: e9d32c1bf0cd7a98 ("perf vendor events: Add support for arch standard events")
Signed-off-by: Like Xu <likexu@tencent.com>
Reviewed-by: John Garry <john.garry@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: Peter Zijlstra <peterz@infradead.org>
Link: http://lore.kernel.org/lkml/20210928102938.69681-1-likexu@tencent.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
tools/perf/pmu-events/jevents.c