RE: [BUG] resctrl: using smp_processor_id() in preemptible code in __l3_mon_event_count() via mbm_handle_overflow() during CPU hotplug

From: Luck, Tony

Date: Thu Jun 11 2026 - 11:04:13 EST


> I do not have a good fix in mind. The read in __l3_mon_event_count()
> fundamentally assumes it runs on a CPU of the domain, but during hotplug
> the overflow work can be migrated off that CPU; neither the cpus_read_lock()
> held here nor the existing cpumask_test_cpu() guard addresses the
> preemptible-context use of smp_processor_id() itself.
>
> I would appreciate your guidance on how this should best be addressed.
>
> I can provide the full log and a reproducer on request.
>

Qinyun Tan,

I think this is addressed by this pending patch:

https://lore.kernel.org/all/b5178a191a8a660e1f4aed356484d4eebfbd30fc.1781029125.git.reinette.chatre@xxxxxxxxx/

[At least the scenario seems similar with CPU offline and subsequent unbound run of a worker]

-Tony