From nobody Mon Sep 28 16:21:58 2026 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id CF3EA3E00A9; Thu, 20 Aug 2026 09:10:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=193.142.43.55 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787217009; cv=none; b=Po8dZbowOYRVwH9dBG9Tpa4Bcm76LSpJQwEC9I7jvY4iD2Gasw51/ZQwKTL3K0E2QWxDcztTFojJLN19EyMhDoQ4HBQMSemNvS9W9e9AG6ajLYK76NvxXxqItn6Hc/hePQDgnCzZRv0h1q3MoTiMRfIG0wU71MMxqtAKQXBMCcY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787217009; c=relaxed/simple; bh=1GHoVARcWiWdC0pjwI672hWeXlgYJq5tG5ASaZH5GRo=; h=Date:From:To:Subject:Cc:In-Reply-To:References:MIME-Version: Message-ID:Content-Type; b=BwVSWgur6RbuUN3GSyvYbSHhcDaT71TaUawPdOkJbkCnmfAvU8zI5Mvf+AFFcamM/GUSioGybZAoOkVgeGU72LU6zJPfvRAO2YpVuNVm1Qve0EX273x/w/c+gZJNJJiyO5UZC5Quov33m5O6R7fAIPuHMzgDgm1RzGPDKdYboKY= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de; spf=pass smtp.mailfrom=linutronix.de; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=KcsiEWGG; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=gtdycPUw; arc=none smtp.client-ip=193.142.43.55 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linutronix.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="KcsiEWGG"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="gtdycPUw" Date: Thu, 20 Aug 2026 09:10:04 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1787217006; 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=4n8w6lBdH0oBgpdM9G9kGnwHAYW06jYewsD/KHJ12WE=; b=KcsiEWGGO+u5Wv9tv0GIteqqsBkI+beq02mrzkqFy6y9CF9h4CCq9A2N5gwdPHp0UHPh6N 5yealfyqdboXzG9BdPlk57+pv3VLFm8f4tM58V/nIkfZCBJ1853dIH6rQPbxwi2s5EfnN5 IjcKgDEbRpl1lVUYpJDiaDr096kugC4IpYW1nSzvB13N3+RuHy/e6VPO27rAid1N6OoRC+ 7VrWaBxTrJVqVbZK1oiCJG5qJcKrQtmPo6TzS3josK/NTyjkJgle4MQAjElgOwGkxAbPEL V5NGcX6zAof1yQjEsQW856q0+62i5cVbfv5mrC8DoK7hzTMJQXVcxpPUuSZXmA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1787217006; 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=4n8w6lBdH0oBgpdM9G9kGnwHAYW06jYewsD/KHJ12WE=; b=gtdycPUwrSCQDNPonrduiCSsDjlAaBm8PPeViyPHu/bNj/hWGqiDORlsRxxYAgXOOWMVvD AluVQGV3MHc6QRDQ== From: "tip-bot2 for Sebastian Andrzej Siewior" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: sched/urgent] sched/topology: Add a cpus_read_lock to rebuild_sched_domains() Cc: Sebastian Andrzej Siewior , "Peter Zijlstra (Intel)" , Chen Yu , Tim Chen , Waiman Long , Valentin Schneider , Shrikanth Hegde , Aaron Tomlin , Dietmar Eggemann , x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <20260813073855.ji2UrtVh@linutronix.de> References: <20260813073855.ji2UrtVh@linutronix.de> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-ID: <178721700441.1542179.7625037542827854652.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails Precedence: bulk Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable The following commit has been merged into the sched/urgent branch of tip: Commit-ID: 666a32836c8f9daf9b0067c49b04d5201fb8f3ba Gitweb: https://git.kernel.org/tip/666a32836c8f9daf9b0067c49b04d5201= fb8f3ba Author: Sebastian Andrzej Siewior AuthorDate: Thu, 13 Aug 2026 09:38:55 +02:00 Committer: Peter Zijlstra CommitterDate: Thu, 20 Aug 2026 11:01:34 +02:00 sched/topology: Add a cpus_read_lock to rebuild_sched_domains() A read from /proc/sys/kernel/sched_rt_runtime_us leads to backtrace due to missing cpu_hotplug_lock with CONFIG_CPUSETS=3Dn. The callchain is sched_rt_handler() -> partition_sched_domains() -> sched_cache_set() -> static_key_enable_cpuslocked(&sched_cache_present). sched_cache_set() itself is also invoked from sched_init_domains() which is early during the boot, holding just the sched_domains_mutex_lock(). Here is no warning because it happens before user space is running (and hotplug operations are not possible). There is also sched_cache_active_set() which acquires the hotplug lock before invoking any of the _cpuslocked() functions. This is only a problem with CONFIG_CPUSETS=3Dn because in the =3Dy case the other implementation of rebuild_sched_domains acquires the CPU-hotplug lock. Acquire CPU hotplug lock before in rebuild_sched_domains(), before partition_sched_domains() is invoked for the CONFIG_CPUSETS=3Dn case. Fixes: a7660ce1590fc ("sched/cache: Fix has_multi_llcs iff at least one par= tition has multiple LLCs") Signed-off-by: Sebastian Andrzej Siewior Reivewed-by: Ridong Chen Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Chen Yu Reviewed-by: Tim Chen Reviewed-by: Waiman Long Reviewed-by: Valentin Schneider Reviewed-by: Shrikanth Hegde Reviewed-by: Aaron Tomlin Tested-by: Dietmar Eggemann Link: https://patch.msgid.link/20260813073855.ji2UrtVh@linutronix.de --- include/linux/cpuset.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/linux/cpuset.h b/include/linux/cpuset.h index 9db2d4f..6a3f4d4 100644 --- a/include/linux/cpuset.h +++ b/include/linux/cpuset.h @@ -279,6 +279,7 @@ static inline void dl_rebuild_rd_accounting(void) =20 static inline void rebuild_sched_domains(void) { + guard(cpus_read_lock)(); partition_sched_domains(1, NULL, NULL); } =20