From patchwork Thu Nov 23 15:14:16 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: tip-bot2 for Thomas Gleixner X-Patchwork-Id: 168975 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:ce62:0:b0:403:3b70:6f57 with SMTP id o2csp517006vqx; Thu, 23 Nov 2023 07:14:48 -0800 (PST) X-Google-Smtp-Source: AGHT+IFJgNY8Oj2Knv4XuH7lzfntFg/LHHLnatJkGzmg1AS5ewfPAsIheyG1xky5XjyJ1xdfQCma X-Received: by 2002:a17:902:e751:b0:1cf:7194:8502 with SMTP id p17-20020a170902e75100b001cf71948502mr6106976plf.46.1700752488154; Thu, 23 Nov 2023 07:14:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700752488; cv=none; d=google.com; s=arc-20160816; b=CaEDQyFHeRsP/2veOhOLriT8gC4Q194Ln1YBAtfqbdUI5AuBLJ1Tp9USxMxq8GHLi3 XnesaFwN/lZgDYKWTiLU1OY9R2TaKaV1UKKM31LVo3ZAgAiB0MymvVP/sTgn3SteC+J5 +D+0ZNo2zn3o18BaVEp0GS3tlEy4Yt8rpCFb+iUCFV6/i8BzBbwNqCHcEdFQWsgXbFn4 mMIKcSTznxYJEJQyfCAhlKfjv072PnmUL5t8sj1khGTd6YeFFglVSp91nLcfhyX7+TZf aroCSFQm0TYqm2CVvB4HPanGpsg1vtZL0z6d9r17y8McRutbcrcB//hwNsO+RSnUHp9k USuA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:robot-unsubscribe :robot-id:message-id:mime-version:references:in-reply-to:cc:subject :to:reply-to:sender:from:dkim-signature:dkim-signature:date; bh=jM1G78Pb55OZs6pBQVdGZGxOr3xM0EcYWgrlIXzPnrQ=; fh=J79tLDgAR0i+FyjVnQ58JWeipZJojlTyCaiz01IoQKc=; b=uyVLqNGrXRIE2FADJAYGOuhVcnxXBQBUhGaJkOnvN9XY2+fB8hjmGPFAo21joHOsew 6i7I6IIENimmqDhvzAvqZnEKFyvx21wRWArTyUBTw6004yx4cyzqmorSxgLjxzGvH4xa Se1uh4VD32dMZguFiFPhMtvnLtRLdBP8uJpOidhmQ/6OHzzI7vf4BO0GsiQ7rZ5mvn4D RwoennRq8ZttTi/ZasbeJg6iJYlwlydQln7a2XWqjyAnVwl5stV1Du/RuRX7hgKX2Dqs +qrSnXPpgEgUQGy+k5CGbbtSCe5oCRq1y/nwsTKR5dtW9iCaGYylTJIU4AW8NNPiulWn Z9Ow== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=1JSs4nTz; dkim=neutral (no key) header.i=@linutronix.de header.b=TLkf1xMy; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: from howler.vger.email (howler.vger.email. [2620:137:e000::3:4]) by mx.google.com with ESMTPS id k3-20020a170902694300b001c9cc3a07c3si1241153plt.280.2023.11.23.07.14.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 23 Nov 2023 07:14:48 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) client-ip=2620:137:e000::3:4; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=1JSs4nTz; dkim=neutral (no key) header.i=@linutronix.de header.b=TLkf1xMy; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by howler.vger.email (Postfix) with ESMTP id B741E8097203; Thu, 23 Nov 2023 07:14:41 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346017AbjKWPOV (ORCPT + 99 others); Thu, 23 Nov 2023 10:14:21 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37966 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229532AbjKWPOQ (ORCPT ); Thu, 23 Nov 2023 10:14:16 -0500 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9CDC4D48; Thu, 23 Nov 2023 07:14:19 -0800 (PST) Date: Thu, 23 Nov 2023 15:14:16 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1700752457; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=jM1G78Pb55OZs6pBQVdGZGxOr3xM0EcYWgrlIXzPnrQ=; b=1JSs4nTzE5LpQ4sPT9zKJHsvx1BJxLLT8pDp8fXuGrIMfwAIX9FDRprd4tEMmaOqSEDvxO S62aYPyjzB1lUzGCu7YogXabdAdaXWSKbvMeiJjYKobyBFqVwfOKKAX8bzWEbOBVc/jAoW CmzlPA77JzrhlcqK4lnUc27ahZa6OIciFYNy2GAMHFQA0fu0sJZqktBEuQ77LDXbQ4nq3O UScslkluHm5wmRTB9tSiM10gCPDBNspsEX5M369lkPKXbYhUL4pm/rk7jwo/P7kvC38N9S GaRO4OaaivsvFddpyYfDRNE9yKwWOxOh9KADJL9NRw34gQhVHZoXJedirv7Erw== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1700752457; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=jM1G78Pb55OZs6pBQVdGZGxOr3xM0EcYWgrlIXzPnrQ=; b=TLkf1xMyk1ewKsc8YcLU9dH+6gmfXuD7ztoWBPJA2Z64jiUmMWLNaBPbH2JwK4rLVhxM0s z3q1R34n48oCyqCw== From: "tip-bot2 for Peter Zijlstra" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: perf/core] perf: Fix the nr_addr_filters fix Cc: Thomas Richter , "Peter Zijlstra (Intel)" , x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <20231122100756.GP8262@noisy.programming.kicks-ass.net> References: <20231122100756.GP8262@noisy.programming.kicks-ass.net> MIME-Version: 1.0 Message-ID: <170075245640.398.10957692681465500006.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on howler.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (howler.vger.email [0.0.0.0]); Thu, 23 Nov 2023 07:14:42 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1783368241183589284 X-GMAIL-MSGID: 1783368241183589284 The following commit has been merged into the perf/core branch of tip: Commit-ID: 388a1fb7da6aaa1970c7e2a7d7fcd983a87a8484 Gitweb: https://git.kernel.org/tip/388a1fb7da6aaa1970c7e2a7d7fcd983a87a8484 Author: Peter Zijlstra AuthorDate: Wed, 22 Nov 2023 11:07:56 +01:00 Committer: Peter Zijlstra CommitterDate: Thu, 23 Nov 2023 16:08:31 +01:00 perf: Fix the nr_addr_filters fix Thomas reported that commit 652ffc2104ec ("perf/core: Fix narrow startup race when creating the perf nr_addr_filters sysfs file") made the entire attribute group vanish, instead of only the nr_addr_filters attribute. Additionally a stray return. Insufficient coffee was involved with both writing and merging the patch. Fixes: 652ffc2104ec ("perf/core: Fix narrow startup race when creating the perf nr_addr_filters sysfs file") Reported-by: Thomas Richter Signed-off-by: Peter Zijlstra (Intel) Tested-by: Thomas Richter Link: https://lkml.kernel.org/r/20231122100756.GP8262@noisy.programming.kicks-ass.net --- kernel/events/core.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/kernel/events/core.c b/kernel/events/core.c index 4f0c45a..59b332c 100644 --- a/kernel/events/core.c +++ b/kernel/events/core.c @@ -11417,12 +11417,10 @@ static umode_t pmu_dev_is_visible(struct kobject *kobj, struct attribute *a, int struct device *dev = kobj_to_dev(kobj); struct pmu *pmu = dev_get_drvdata(dev); - if (!pmu->nr_addr_filters) + if (n == 2 && !pmu->nr_addr_filters) return 0; return a->mode; - - return 0; } static struct attribute_group pmu_dev_attr_group = {