From: Thomas Gleixner <tglx@linutronix.de>
To: Borislav Petkov <bp@alien8.de>
Cc: X86 ML <x86@kernel.org>, LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] x86/apic: Do not use smp_processor_id() in preemptible code
Date: Tue, 26 Sep 2017 21:03:08 +0200 (CEST) [thread overview]
Message-ID: <alpine.DEB.2.20.1709262102340.2078@nanos> (raw)
In-Reply-To: <20170926170845.13955-1-bp@alien8.de>
On Tue, 26 Sep 2017, Borislav Petkov wrote:
> 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);
Duh......
> free_cpumask_var(per_cpu(ipi_mask, dead_cpu));
> return 0;
> }
> --
> 2.13.0
>
>
prev parent reply other threads:[~2017-09-26 19:03 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-26 17:08 Borislav Petkov
2017-09-26 19:03 ` Thomas Gleixner [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=alpine.DEB.2.20.1709262102340.2078@nanos \
--to=tglx@linutronix.de \
--cc=bp@alien8.de \
--cc=linux-kernel@vger.kernel.org \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®