lkml.org 
[lkml]   [2017]   [Sep]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] x86/apic: Do not use smp_processor_id() in preemptible code
Date
From: Borislav Petkov <bp@suse.de>

Call stack is:

check_preemption_disabled
? x2apic_prepare_cpu
x2apic_dead_cpu
cpuhp_invoke_callback
? cpuhp_kick_ap_work
? cpumask_next
_cpu_down
freeze_secondary_cpus
hibernation_snapshot
...

i.e., box is doing suspend-to-disk.

Signed-off-by: Borislav Petkov <bp@suse.de>
---
arch/x86/kernel/apic/x2apic_cluster.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/x86/kernel/apic/x2apic_cluster.c b/arch/x86/kernel/apic/x2apic_cluster.c
index 3da94277140f..6050c5364bdc 100644
--- a/arch/x86/kernel/apic/x2apic_cluster.c
+++ b/arch/x86/kernel/apic/x2apic_cluster.c
@@ -156,7 +156,7 @@ static int x2apic_dead_cpu(unsigned int dead_cpu)
{
struct cluster_mask *cmsk = per_cpu(cluster_masks, dead_cpu);

- cpumask_clear_cpu(smp_processor_id(), &cmsk->mask);
+ cpumask_clear_cpu(dead_cpu, &cmsk->mask);
free_cpumask_var(per_cpu(ipi_mask, dead_cpu));
return 0;
}
--
2.13.0
\
 
 \ /
  Last update: 2017-09-26 19:10    [W:0.051 / U:0.516 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site