From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9FD2BC6FD18 for ; Tue, 25 Apr 2023 09:14:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233648AbjDYJOw (ORCPT ); Tue, 25 Apr 2023 05:14:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55834 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233659AbjDYJOs (ORCPT ); Tue, 25 Apr 2023 05:14:48 -0400 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id C552510FE for ; Tue, 25 Apr 2023 02:14:46 -0700 (PDT) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 841D94B3; Tue, 25 Apr 2023 02:15:30 -0700 (PDT) Received: from [10.1.197.1] (ewhatever.cambridge.arm.com [10.1.197.1]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id A59673F587; Tue, 25 Apr 2023 02:14:45 -0700 (PDT) Message-ID: <55ed1d19-cce9-b9b0-30d6-21b5ee3e5fe9@arm.com> Date: Tue, 25 Apr 2023 10:14:44 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.10.0 Subject: Re: [PATCH] coresight: perf: Release Coresight path when alloc trace id failed Content-Language: en-US To: Ruidong Tian , coresight@lists.linaro.org Cc: mike.leach@linaro.org, leo.yan@linaro.org, alexander.shishkin@linux.intel.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org References: <20230425032416.125542-1-tianruidong@linux.alibaba.com> From: Suzuki K Poulose In-Reply-To: <20230425032416.125542-1-tianruidong@linux.alibaba.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 25/04/2023 04:24, Ruidong Tian wrote: > 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. > > Signed-off-by: Ruidong Tian Good catch, I will queue this. Thanks Suzuki > --- > drivers/hwtracing/coresight/coresight-etm-perf.c | 1 + > 1 file changed, 1 insertion(+) > > 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; > } >