diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2020-11-20 10:30:48 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2020-11-20 10:30:48 -0800 |
commit | 4ccf7a01e805f04defd423fb410f47a13af76399 (patch) | |
tree | e41231d43d4e3f501dc3cd1de9b3661a6619a259 /arch/x86/xen | |
parent | bd4d74e8f8b201caf4dab064b8bc7d01a72747da (diff) | |
parent | 65cae18882f943215d0505ddc7e70495877308e6 (diff) | |
download | linux-4ccf7a01e805f04defd423fb410f47a13af76399.tar.gz linux-4ccf7a01e805f04defd423fb410f47a13af76399.tar.bz2 linux-4ccf7a01e805f04defd423fb410f47a13af76399.zip |
Merge tag 'for-linus-5.10b-rc5-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip
Pull xen fix from Juergen Gross:
"A single fix for avoiding WARN splats when booting a Xen guest with
nosmt"
* tag 'for-linus-5.10b-rc5-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip:
x86/xen: don't unbind uninitialized lock_kicker_irq
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; |