Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp6428483rwr; Mon, 24 Apr 2023 20:41:14 -0700 (PDT) X-Google-Smtp-Source: AKy350YIn1QPVpKdthewl7rHbjvJapjzETc9XFBurpRdYan2S2OZuciN4ukv8mLlUUIaPCifa3Q+ X-Received: by 2002:a17:902:f551:b0:1a5:22a:165c with SMTP id h17-20020a170902f55100b001a5022a165cmr18305453plf.0.1682394074017; Mon, 24 Apr 2023 20:41:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682394074; cv=none; d=google.com; s=arc-20160816; b=0SQxS922wpLuZcKoLF2Yvcold60s1zHuId625aQMOCzK5hC+KBd7ZHiK+TPYMicgoG q5hMiofCfcpf7wBM1owGzXAMlzTDK8jh2Bl5nsc3Khjrte6hdEJBJ/40N49vVX/Bku5P UTYJASPCsqhc9VJmF+M+Xkok4jIvE362plIHHzbJcsOyi+5r60fQsuo2b2sfWrPzde1G 8qjI6MJjC5HuoP4KdARrL1NwTA6iABaVR4ZKYpK98XeBV+bFldJFI/+IZmeOM1fuMWMj eDGxdn1JRuBv9bo7XDzx4qEdAZe7ElcQITfoIKZuaKLeHXbfApUyjjkp1JbeBMsv9PU/ g0dQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=5Xqo48+xn8sXzaZOnfSDepvorbDMCDnPxG+vrqQ9EN4=; b=IqhZoLgh/xQkdJviqEYlsIB3Ep4bT5uZhWbIc2PNGOI/oPoFh20mcOPPFX/eoBCugH IyEpIcDabbKBmETCFtjbrHNntUjPww81eXPWeqm2ToVHi4pB05g3w2KPdg1FVS+EW3qH 6Q6gMVflvuCLRaNuVxP3G5eRvloy6iQAMVbDG3W/cPsrhTLJ0h9H+nbIQnv+kMYOh70X 59lXyvLRcd61wP4diultauki+wg7xY2D3Qp3hK1xiDfP9flfxm8CCXM+M7e76B0fBv5/ YxrpXOs35ioF3DYlD7g7f63SdYKO9pOmJqStPcKryBq79FD58TFox+oPUgmG4WIQeD1f TR/A== 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=alibaba.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h192-20020a636cc9000000b004fb33a76e2csi12352080pgc.834.2023.04.24.20.40.59; Mon, 24 Apr 2023 20:41:13 -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=alibaba.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233080AbjDYDY0 (ORCPT + 99 others); Mon, 24 Apr 2023 23:24:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49704 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230195AbjDYDYZ (ORCPT ); Mon, 24 Apr 2023 23:24:25 -0400 Received: from out30-100.freemail.mail.aliyun.com (out30-100.freemail.mail.aliyun.com [115.124.30.100]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 26EC6A8 for ; Mon, 24 Apr 2023 20:24:23 -0700 (PDT) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R781e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018045168;MF=tianruidong@linux.alibaba.com;NM=1;PH=DS;RN=8;SR=0;TI=SMTPD_---0VgyI3jM_1682393057; Received: from localhost(mailfrom:tianruidong@linux.alibaba.com fp:SMTPD_---0VgyI3jM_1682393057) by smtp.aliyun-inc.com; Tue, 25 Apr 2023 11:24:21 +0800 From: Ruidong Tian To: tianruidong@linux.alibaba.com, coresight@lists.linaro.org Cc: suzuki.poulose@arm.com, mike.leach@linaro.org, leo.yan@linaro.org, alexander.shishkin@linux.intel.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH] coresight: perf: Release Coresight path when alloc trace id failed Date: Tue, 25 Apr 2023 11:24:16 +0800 Message-Id: <20230425032416.125542-1-tianruidong@linux.alibaba.com> X-Mailer: git-send-email 2.33.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-9.9 required=5.0 tests=BAYES_00, ENV_AND_HDR_SPF_MATCH,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE,UNPARSEABLE_RELAY, USER_IN_DEF_SPF_WL 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 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 --- 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; } -- 2.33.1