Commit-ID: 68a15813474383344c55a0ac93cd813e4ea6eb09 Gitweb: http://git.kernel.org/tip/68a15813474383344c55a0ac93cd813e4ea6eb09 Author: Linus Torvald <torvalds@xxxxxxxxxxxxxxxxxxxx> AuthorDate: Fri, 21 Aug 2009 18:04:44 +0200 Committer: Thomas Gleixner <tglx@xxxxxxxxxxxxx> CommitDate: Fri, 21 Aug 2009 20:40:47 +0200 x86: Prevent IPI with empty mask In bugzilla #13933 (http://bugzilla.kernel.org/show_bug.cgi?id=13933) we got bug reports that the kernel freezes sporadically on older P3 SMP systems. It was bisected down to commit 4595f9620 (x86: change flush_tlb_others to take a const struct cpumask). It seems that older hardware gets upset when an IPI is issued with an empty target mask. The original patch contained a WARN_ONCE(!mask) which triggered and the testers confirmed that the early return resolves the problem. I removed the WARN_ONCE as we already know where to look so there is no need to swamp kerneloops and logs with that. Linus noted that commit 694aa9606 (xen: fix xen_flush_tlb_others) seems to imply that empty cpumasks can happen. He also proposed a more complex fix further down in the call chain to avoid calling the IPI code at all. While it is the right thing to do, it's too complex for .31 and stable. Reported-by: Martin Rogge <marogge@xxxxxxxxxxxxx> Bisected-by: Pavel Vilim <wylda@xxxxxxxx> Tested-by Thomas Bjornell <thomas.bjornell@xxxxxxxxx> Tested-by: Martin Rogge <marogge@xxxxxxxxxxxxx> Signed-off-by: Thomas Gleixner <tglx@xxxxxxxxxxxxx> Cc: Linus Torvald <torvalds@xxxxxxxxxxxxxxxxxxxx> Cc: stable@xxxxxxxxxx --- arch/x86/kernel/apic/ipi.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/arch/x86/kernel/apic/ipi.c b/arch/x86/kernel/apic/ipi.c index dbf5445..c83acda 100644 --- a/arch/x86/kernel/apic/ipi.c +++ b/arch/x86/kernel/apic/ipi.c @@ -106,6 +106,9 @@ void default_send_IPI_mask_logical(const struct cpumask *cpumask, int vector) unsigned long mask = cpumask_bits(cpumask)[0]; unsigned long flags; + if (!mask) + return; + local_irq_save(flags); WARN_ON(mask & ~cpumask_bits(cpu_online_mask)[0]); __default_send_IPI_dest_field(mask, vector, apic->dest_logical); -- To unsubscribe from this list: send the line "unsubscribe linux-tip-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html
![]() |