linux/include
Sebastian Andrzej Siewior 666a32836c 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=n. 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=n because in the =y 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=n case.

Fixes: a7660ce159 ("sched/cache: Fix has_multi_llcs iff at least one partition has multiple LLCs")
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Reivewed-by: Ridong Chen <ridong.chen@linux.dev>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Reviewed-by: Chen Yu <yu.c.chen@intel.com>
Reviewed-by: Tim Chen <tim.c.chen@linux.intel.com>
Reviewed-by: Waiman Long <longman@redhat.com>
Reviewed-by: Valentin Schneider <vschneid@redhat.com>
Reviewed-by: Shrikanth Hegde <sshegde@linux.ibm.com>
Reviewed-by: Aaron Tomlin <atomlin@atomlin.com>
Tested-by: Dietmar Eggemann <dietmar.eggemann@arm.com>
Link: https://patch.msgid.link/20260813073855.ji2UrtVh@linutronix.de
2026-08-20 11:01:34 +02:00
..
acpi Driver core changes for 7.3-rc1 2026-08-19 10:42:18 -07:00
asm-generic audit/stable-7.3 PR 20260814 2026-08-19 16:21:32 -07:00
clocksource clocksource/drivers/samsung_pwm: Switch to raw_spinlock_t type 2026-08-13 18:13:15 +02:00
crypto This update includes the following changes: 2026-08-19 17:25:42 -07:00
cxl
drm Revert "drm/sched: Remove FIFO and RR and simplify to a single run queue" 2026-08-11 17:34:10 +01:00
dt-bindings sound updates for 7.3-rc1 2026-08-19 10:04:59 -07:00
hyperv mshv: fix hv_input_get_system_property struct 2026-07-22 21:58:21 +00:00
keys keys: Pin request_key_auth payload in instantiate paths 2026-06-15 15:19:13 +03:00
kunit gpio updates for v7.3-rc1 2026-08-19 09:10:07 -07:00
kvm KVM: arm64: vgic: Fix race between LPI release and re-registration 2026-07-23 09:56:57 +01:00
linux sched/topology: Add a cpus_read_lock to rebuild_sched_domains() 2026-08-20 11:01:34 +02:00
math-emu
media media: rppx1: Add framework to support Dreamchip RPPX1 ISP 2026-07-30 20:51:35 +03:00
memory
misc
net netfilter pull request 26-08-10 2026-08-11 18:32:18 -07:00
pcmcia Replace <linux/mod_devicetable.h> by more specific <linux/device-id/*.h> (headers) 2026-07-03 07:38:16 +02:00
ras
rdma RDMA v7.2 merge window 2026-06-18 08:16:21 -07:00
rv rv: Add KUnit tests for some LTL monitors 2026-07-31 16:27:46 +02:00
scsi ata changes for 7.3 2026-08-19 12:31:50 -07:00
soc regulator: Updates for v7.3 2026-08-19 09:36:58 -07:00
sound ASoC: Updates for v7.3 2026-08-18 08:35:39 +02:00
target
trace tracing updates for v7.3: 2026-08-19 14:06:14 -07:00
uapi This update includes the following changes: 2026-08-19 17:25:42 -07:00
ufs Merge branch 7.1/scsi-fixes into 7.2/scsi-staging 2026-06-15 21:01:30 -04:00
vdso vDSO: Make clockmode constants available without CONFIG_GENERIC_GETTIMEOFDAY 2026-08-10 16:25:21 +02:00
video
xen xen: Drop CONFIG_XEN_AUTO_XLATE 2026-08-06 13:18:32 +02:00
Kbuild