Received: by 2002:a05:7412:cfc7:b0:fc:a2b0:25d7 with SMTP id by7csp2324824rdb; Wed, 21 Feb 2024 04:23:52 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCXAIoLDnjeUQ2QaFonFdJsk2pwIDKE3ZGRP8ZraZtrEzLSRDcYAVC8YTsP2iuREqAdve4C9JhUPHxh4ZgQQ+w+3gBzxoLc5m5CriWGn6A== X-Google-Smtp-Source: AGHT+IHc5861exDRZQh2MLyekr5ROZiKGzFJyxhnkrqtdLfy4YLunISmFuZaa2shreQw5NqhX7QU X-Received: by 2002:a05:6a20:e608:b0:19e:9c5e:ad80 with SMTP id my8-20020a056a20e60800b0019e9c5ead80mr18893016pzb.62.1708518232242; Wed, 21 Feb 2024 04:23:52 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708518232; cv=pass; d=google.com; s=arc-20160816; b=pDZcsxITvhJYuPiJZdysaHyZlMz4Qif7vtXnLkfTIicj42ClkJ2Jz79ZnFxHzEFfD4 GzCjLsfU1/eeL9F2l6W4PDvoWFOqeTkKnrR+PGDhGux+cGDvhxbFWMzLMfXixL3JK2J/ dA4vzegR+b80r9Ta2iSQTkADqzFuhKWgXD1aptazY9bP0rZxcm9KFa6PQxAdkVQieBp9 FYFNBgaf0cBpHayy7VZHFEaYHwwxnsZ0QBJpL+k5qcSstuh02LEPjUEnDxwD6Van9xoI jLsygAbUgRJgYZxxA41CpHYo8qt018eu6WFf+O5YFxJ/rIn3g3qS3rC52rou/3zPItgj LshQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from; bh=en+6FTUC+HkWEeJwdYOPtXtiV5hb2Bcezbl1PSrLpcE=; fh=3Jk9s+3OG/uUZPl9Gruf4+vzHoNn12n+BxYqSAcvLJ4=; b=mILkxrVyrVVMAQbepIMwIMbXXpwXjoet3kGWcwAxIyj9dtQrwFAgXtxrF2n4/ZR1uE xCAFDoy28e50JHy0HQtwFHED92YWNAAzfG9UveiBxRvBWIfKHfRO6L1kahjJAyUNE0J2 +W61jZGhD+Wan18PmOPm+rYpsgLWQ8CbTY3P627cvWUs3o/rXtq2N6ardLbQS7at5b6U NZIS3t+KkO4bddk1UTGtlY5U/eNOl2oC0NAxn1m9kWTlieU3FU1owp14k/v0ykHIPkhy 4ksm/V4z7KU24qJb4bNgcQ3JJ8U2rDz22+gbkeAhSBG5yTsjMzT8f/jU43eK1QJhrcB5 pFqw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=arm.com dmarc=pass fromdomain=arm.com); spf=pass (google.com: domain of linux-kernel+bounces-74691-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-74691-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id m184-20020a6258c1000000b006e0743b7e12si3774342pfb.47.2024.02.21.04.23.52 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 21 Feb 2024 04:23:52 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-74691-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=arm.com dmarc=pass fromdomain=arm.com); spf=pass (google.com: domain of linux-kernel+bounces-74691-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-74691-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id EA3342842CA for ; Wed, 21 Feb 2024 12:23:51 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 2A9B550271; Wed, 21 Feb 2024 12:23:47 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id C3FA34F8A2 for ; Wed, 21 Feb 2024 12:23:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.140.110.172 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708518226; cv=none; b=suBWxo2A6iICSYsX7gazHyznfqAHvYDQ9TGPRk7sEPWclGL5OMJCWRa3WczXno9Tg2h9i7A9juXSh5zpuElPQnYoAMtpxbJg09FXTviqdfNKG3+3pKZTtxBqAKdCDTNRdlDRrz+iDQI4Bc9L9cDzEyO3eu37gwYBWPdsW0reUNk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708518226; c=relaxed/simple; bh=oX9aizoUCrRamqQe1T5d8/5QrboBphelf0aIZYAOE6I=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=YPVVU09sY7KtdIooLQbwQYe/rS70rP/F5CdpP7Vp1XRkFu4MWjbULfU6D9+izfZ7VDPyQU0bR6VV4+S5Cenmnnpa95FeXpdIy5UoKyv3Jvctl41o1/mErmoYiIDplmk2lE4TBOxj1uL5sD+0ln62rXyWb6/KSQCLFCI6CWBA/JY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com; spf=pass smtp.mailfrom=arm.com; arc=none smtp.client-ip=217.140.110.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=arm.com 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 5B572FEC; Wed, 21 Feb 2024 04:24:22 -0800 (PST) Received: from eglon.cambridge.arm.com (eglon.cambridge.arm.com [10.1.197.60]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 6FCC43F762; Wed, 21 Feb 2024 04:23:42 -0800 (PST) From: James Morse To: x86@kernel.org, linux-kernel@vger.kernel.org Cc: Fenghua Yu , Reinette Chatre , Thomas Gleixner , Ingo Molnar , Borislav Petkov , H Peter Anvin , Tony Luck , James Morse Subject: [PATCH] x86/resctrl: Remove lockdep annotation that triggers false positive Date: Wed, 21 Feb 2024 12:23:06 +0000 Message-Id: <20240221122306.633273-1-james.morse@arm.com> X-Mailer: git-send-email 2.39.2 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit get_domain_from_cpu() walks a list of domains to find the one that contains the specified CPU. This needs to be protected against races with CPU hotplug when the list is modified. It has recently gained a lockdep annotation to check this. The lockdep annotation causes false positives when called via IPI as the lock is held, but by another process. Remove it. Reported-by: Tony Luck Link: https://lore.kernel.org/all/ZdUSwOM9UUNpw84Y@agluck-desk3/ Fixes: fb700810d30b ("x86/resctrl: Separate arch and fs resctrl locks") Signed-off-by: James Morse --- arch/x86/kernel/cpu/resctrl/core.c | 9 --------- 1 file changed, 9 deletions(-) diff --git a/arch/x86/kernel/cpu/resctrl/core.c b/arch/x86/kernel/cpu/resctrl/core.c index 9f1aa555a8ea..83e40341583e 100644 --- a/arch/x86/kernel/cpu/resctrl/core.c +++ b/arch/x86/kernel/cpu/resctrl/core.c @@ -362,15 +362,6 @@ struct rdt_domain *get_domain_from_cpu(int cpu, struct rdt_resource *r) { struct rdt_domain *d; - /* - * Walking r->domains, ensure it can't race with cpuhp. - * Because this is called via IPI by rdt_ctrl_update(), assertions - * about locks this thread holds will lead to false positives. Check - * someone is holding the CPUs lock. - */ - if (IS_ENABLED(CONFIG_LOCKDEP)) - lockdep_is_cpus_held(); - list_for_each_entry(d, &r->domains, list) { /* Find the domain that contains this CPU */ if (cpumask_test_cpu(cpu, &d->cpu_mask)) -- 2.39.2