]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
coresight: etm: perf: Fix warning caused by etm_setup_aux failure
authorTingwei Zhang <tingwei@codeaurora.org>
Mon, 28 Sep 2020 16:34:56 +0000 (10:34 -0600)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 29 Oct 2020 09:07:45 +0000 (10:07 +0100)
commit9d645e979fdf06ea2ebf05cc9defe5c7aae6f96a
tree969bc1d28f54ef614d95d614ec5350e935a381ec
parent4d3adf453eec05a28b0ab033eb0b4b32c62b48d7
coresight: etm: perf: Fix warning caused by etm_setup_aux failure

[ Upstream commit 716f5652a13122364a65e694386b9b26f5e98c51 ]

When coresight_build_path() fails on all the cpus, etm_setup_aux
calls etm_free_aux() to free allocated event_data.
WARN_ON(cpumask_empty(mask) will be triggered since cpu mask is empty.
Check event_data->snk_config is not NULL first to avoid this
warning.

Fixes: f5200aa9831f38 ("coresight: perf: Refactor function free_event_data()")
Reviewed-by: Mike Leach <mike.leach@linaro.org>
Reviewed-by: Suzuki K Poulose <suzuki.poulose@arm.com>
Signed-off-by: Tingwei Zhang <tingwei@codeaurora.org>
Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
Link: https://lore.kernel.org/r/20200928163513.70169-9-mathieu.poirier@linaro.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/hwtracing/coresight/coresight-etm-perf.c