diff options
author | Borislav Petkov <bp@suse.de> | 2020-12-01 20:01:27 +0300 |
---|---|---|
committer | Borislav Petkov <bp@suse.de> | 2020-12-01 20:01:27 +0300 |
commit | 87314fb181f9042a226d721ab4a5579ddfca139c (patch) | |
tree | b663e58cfe19ecf5003d4ea6e8048f6ae1925e9f /arch/x86/xen | |
parent | 2002d2951398317d0f46e64ae6d8dd58ed541c6d (diff) | |
parent | b65054597872ce3aefbc6a666385eabdf9e288da (diff) | |
download | linux-87314fb181f9042a226d721ab4a5579ddfca139c.tar.xz |
Merge tag 'v5.10-rc6' into x86/cache
Merge -rc6 tag to pick up dependent changes.
Signed-off-by: Borislav Petkov <bp@suse.de>
Diffstat (limited to 'arch/x86/xen')
-rw-r--r-- | arch/x86/xen/spinlock.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/arch/x86/xen/spinlock.c b/arch/x86/xen/spinlock.c index 799f4eba0a62..043c73dfd2c9 100644 --- a/arch/x86/xen/spinlock.c +++ b/arch/x86/xen/spinlock.c @@ -93,10 +93,20 @@ void xen_init_lock_cpu(int cpu) void xen_uninit_lock_cpu(int cpu) { + int irq; + if (!xen_pvspin) return; - unbind_from_irqhandler(per_cpu(lock_kicker_irq, cpu), NULL); + /* + * When booting the kernel with 'mitigations=auto,nosmt', the secondary + * CPUs are not activated, and lock_kicker_irq is not initialized. + */ + irq = per_cpu(lock_kicker_irq, cpu); + if (irq == -1) + return; + + unbind_from_irqhandler(irq, NULL); per_cpu(lock_kicker_irq, cpu) = -1; kfree(per_cpu(irq_name, cpu)); per_cpu(irq_name, cpu) = NULL; |