Skip to content

Commit 4ccf7a0

Browse files
committed
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
2 parents bd4d74e + 65cae18 commit 4ccf7a0

1 file changed

Lines changed: 11 additions & 1 deletion

File tree

arch/x86/xen/spinlock.c

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,10 +93,20 @@ void xen_init_lock_cpu(int cpu)
9393

9494
void xen_uninit_lock_cpu(int cpu)
9595
{
96+
int irq;
97+
9698
if (!xen_pvspin)
9799
return;
98100

99-
unbind_from_irqhandler(per_cpu(lock_kicker_irq, cpu), NULL);
101+
/*
102+
* When booting the kernel with 'mitigations=auto,nosmt', the secondary
103+
* CPUs are not activated, and lock_kicker_irq is not initialized.
104+
*/
105+
irq = per_cpu(lock_kicker_irq, cpu);
106+
if (irq == -1)
107+
return;
108+
109+
unbind_from_irqhandler(irq, NULL);
100110
per_cpu(lock_kicker_irq, cpu) = -1;
101111
kfree(per_cpu(irq_name, cpu));
102112
per_cpu(irq_name, cpu) = NULL;

0 commit comments

Comments
 (0)