Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp6701680rwr; Tue, 25 Apr 2023 02:21:09 -0700 (PDT) X-Google-Smtp-Source: AKy350Zkh7eDdFQkZ62Sms4fnvf6lJ61HvtQGtFEv2Z58D185R3wx1vvhzXNHL3QuxqRsrQlUmsq X-Received: by 2002:a05:6a00:1301:b0:63d:2b95:5476 with SMTP id j1-20020a056a00130100b0063d2b955476mr24324882pfu.23.1682414469240; Tue, 25 Apr 2023 02:21:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682414469; cv=none; d=google.com; s=arc-20160816; b=nls+hUOmBThid0FN4x+CczuuscwmiPPvNdK7jUfklguaI8m+dDAyS36K0Rrr4S4vUY YUd802oKCjDtUy/2Yv+HKD3kWB9AHklWsWFf44JfHDznjBkKVPxVMG+EG0yy85gof40T MIXUm1Jejoqne1kUTFCNoPmwL0Gpl86TNVQhNcM++ibmagLGDzPT1zg0vzU7TX8GW8tJ ynynbJvUnOoABXc6QL0YyaTpFWxIyIrj9SOrMAX2+Z9m9Yn0Z7fI8lKEOimebV3KU7Pe x/jXDkuMu4LiQjKLlG+MYGxBms6xwrthZSZuMSgRU95q+7of01/j5259oCY6J4qxLIP5 Zb5g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id; bh=uPeI+uIiTlcU3HvBKzg5GIWGZ6ZeKOEdF1XQr8HcJEU=; b=kCYw6s1Y+qscbU/qah7jMXIzT0QGQFzOrgTFNnbio7088jtrvLXNd31XEFrjKf73bS k3l3aa7eG8l/RVPC1ASbf5vi5pHduKv8S1jJwnj7bHgNBKU3B/m3T9fyqCB37HV8leR7 vCwVaSYXFsqFnpekieec8Oz79IDob93PUMnXotuG+9Gm6X1GryUPxhJMc5TYXkHO8MPv IU7fxMdsZkGIXhfk+NvlQz8qxcwWpPgklh/dUPcqWMjSmxXk6dUmLFNtnxFss8I3tOQk fxjbNrdjyaNq5CTuTZl91GG9jegZgp52EK2U5z48WcAbWlFQPDNHL0a2+v9FpgpbpEHP +KZA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y10-20020a655a0a000000b004fbffa7d04dsi13524606pgs.863.2023.04.25.02.20.56; Tue, 25 Apr 2023 02:21:09 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233554AbjDYJOv (ORCPT + 99 others); Tue, 25 Apr 2023 05:14:51 -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 X-Spam-Status: No, score=-3.1 required=5.0 tests=BAYES_00,NICE_REPLY_A, RCVD_IN_DNSWL_MED,SPF_HELO_NONE,SPF_NONE,SUSPICIOUS_RECIPS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net 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; > } >