From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1030525AbdIZTDT (ORCPT ); Tue, 26 Sep 2017 15:03:19 -0400 Received: from Galois.linutronix.de ([146.0.238.70]:49596 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S966412AbdIZTDS (ORCPT ); Tue, 26 Sep 2017 15:03:18 -0400 Date: Tue, 26 Sep 2017 21:03:08 +0200 (CEST) From: Thomas Gleixner To: Borislav Petkov cc: X86 ML , LKML Subject: Re: [PATCH] x86/apic: Do not use smp_processor_id() in preemptible code In-Reply-To: <20170926170845.13955-1-bp@alien8.de> Message-ID: References: <20170926170845.13955-1-bp@alien8.de> User-Agent: Alpine 2.20 (DEB 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-Linutronix-Spam-Score: -1.0 X-Linutronix-Spam-Level: - X-Linutronix-Spam-Status: No , -1.0 points, 5.0 required, ALL_TRUSTED=-1,SHORTCIRCUIT=-0.0001 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 26 Sep 2017, Borislav Petkov wrote: > From: Borislav Petkov > > 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 > --- > 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); Duh...... > free_cpumask_var(per_cpu(ipi_mask, dead_cpu)); > return 0; > } > -- > 2.13.0 > >