diff options
author | Ruidong Tian <tianruidong@linux.alibaba.com> | 2023-04-25 11:24:16 +0800 |
---|---|---|
committer | Suzuki K Poulose <suzuki.poulose@arm.com> | 2023-05-11 11:18:21 +0100 |
commit | 04ac7f98b92181179ea84439642493f3826d04a2 (patch) | |
tree | 7a0264e1479933a5f6b8b3385ccf304855219e60 /drivers/hwtracing | |
parent | f67bc15e526bb9920683ad6c1891ff9e08981335 (diff) |
coresight: perf: Release Coresight path when alloc trace id failed
Error handler for etm_setup_aux can not release coresight path because
cpu mask was cleared when coresight_trace_id_get_cpu_id failed.
Call coresight_release_path function explicitly when alloc trace id filed.
Fixes: 4ff1fdb4125c4 ("coresight: perf: traceid: Add perf ID allocation and notifiers")
Signed-off-by: Ruidong Tian <tianruidong@linux.alibaba.com>
Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com>
Link: https://lore.kernel.org/r/20230425032416.125542-1-tianruidong@linux.alibaba.com
Diffstat (limited to 'drivers/hwtracing')
-rw-r--r-- | drivers/hwtracing/coresight/coresight-etm-perf.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/hwtracing/coresight/coresight-etm-perf.c b/drivers/hwtracing/coresight/coresight-etm-perf.c index 711f451b6946..89e8ed214ea4 100644 --- a/drivers/hwtracing/coresight/coresight-etm-perf.c +++ b/drivers/hwtracing/coresight/coresight-etm-perf.c @@ -402,6 +402,7 @@ static void *etm_setup_aux(struct perf_event *event, void **pages, trace_id = coresight_trace_id_get_cpu_id(cpu); if (!IS_VALID_CS_TRACE_ID(trace_id)) { cpumask_clear_cpu(cpu, mask); + coresight_release_path(path); continue; } |