Skip to content

Commit c0d848f

Browse files
James Morsebp3tk0v
authored andcommitted
x86/resctrl: Remove lockdep annotation that triggers false positive
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. [ bp: Refresh it ontop of x86/cache. ] Fixes: fb70081 ("x86/resctrl: Separate arch and fs resctrl locks") Reported-by: Tony Luck <tony.luck@intel.com> Signed-off-by: James Morse <james.morse@arm.com> Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de> Link: https://lore.kernel.org/all/ZdUSwOM9UUNpw84Y@agluck-desk3
1 parent fb70081 commit c0d848f

File tree

1 file changed

+0
-9
lines changed
  • arch/x86/kernel/cpu/resctrl

1 file changed

+0
-9
lines changed

arch/x86/kernel/cpu/resctrl/core.c

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -362,15 +362,6 @@ struct rdt_domain *get_domain_from_cpu(int cpu, struct rdt_resource *r)
362362
{
363363
struct rdt_domain *d;
364364

365-
/*
366-
* Walking r->domains, ensure it can't race with cpuhp.
367-
* Because this is called via IPI by rdt_ctrl_update(), assertions
368-
* about locks this thread holds will lead to false positives. Check
369-
* someone is holding the CPUs lock.
370-
*/
371-
if (IS_ENABLED(CONFIG_HOTPLUG_CPU) && IS_ENABLED(CONFIG_LOCKDEP))
372-
WARN_ON_ONCE(!lockdep_is_cpus_held());
373-
374365
list_for_each_entry(d, &r->domains, list) {
375366
/* Find the domain that contains this CPU */
376367
if (cpumask_test_cpu(cpu, &d->cpu_mask))

0 commit comments

Comments
 (0)