On Sun, 1 Nov 2015, Greg KH wrote: > On Sun, Nov 01, 2015 at 07:26:28PM +0100, Marc Haber wrote: > > Hi, > > > > On Sat, Oct 31, 2015 at 03:23:45PM -0700, Greg KH wrote: > > > On Sat, Oct 31, 2015 at 10:15:51PM +0100, Marc Haber wrote: > > > > I run a PC Engines APU in my basement for local infrastructure with > > > > KVM. Kernels 4.2.4 and 4.2.5 panic on bootup pretty fast after the > > > > usual "x86: Booted up 1 node, 2 CPUs", "smpboot: Total of 2 processors > > > > activated (3999.89 BogoMIPS)" message. The message I would expect > > > > instead of the kernel panic would be "devtmpfs: initialized", as one > > > > can see on a successful 4.2.3 boot with identical kernel configuration. > > > > > > If you use 'git bisect' between 4.2.3 and 4.2.5, can you find the > > > problem commit for us to help track this down? > > > > The winner is ... > > [21f751a634f3b5eaf916f940e47f327fbc6e9727] x86/ioapic: Force affinity setting in setup_ioapic_dest() > > > > After rolling this back in 4.2.5, the APU now runs fine. > > Ok, this matches up with commit 21f751a634f3b5eaf916f940e47f327fbc6e9727 > in Linus's tree. > > Thomas and Mika, any thoughts about this? > > Marc, do you have this same problem with Linus's tree at the moment as > well? I just sent a pull request to Linus with a fix for this. Patch below. Thanks, tglx --- commit ababae44108b0e94b58eef6cb5bd830bd040a47f Author: Werner Pawlitschko <werner.pawlitschko@xxxxxxxx> Date: Tue Oct 27 09:08:04 2015 +0900 x86/ioapic: Prevent NULL pointer dereference in setup_ioapic_dest() Commit 4857c91f0d19 changed the way how irq affinity is setup in setup_ioapic_dest() from using the core helper function to unconditionally calling the irq_set_affinity() callback of the underlying irq chip. That results in a NULL pointer dereference for the rare case where the underlying irq chip is lapic_chip which has no irq_set_affinity() callback. lapic_chip is occasionally used for the timer interrupt (irq 0). The fix is simple: Check the availability of the callback instead of calling it unconditionally. Fixes: 4857c91f0d19 "x86/ioapic: Force affinity setting in setup_ioapic_dest()" Signed-off-by: Thomas Gleixner <tglx@xxxxxxxxxxxxx> Cc: stable@xxxxxxxxxxxxxxx diff --git a/arch/x86/kernel/apic/io_apic.c b/arch/x86/kernel/apic/io_apic.c index bb6bfc01cb82..4f2821527014 100644 --- a/arch/x86/kernel/apic/io_apic.c +++ b/arch/x86/kernel/apic/io_apic.c @@ -2547,7 +2547,9 @@ void __init setup_ioapic_dest(void) mask = apic->target_cpus(); chip = irq_data_get_irq_chip(idata); - chip->irq_set_affinity(idata, mask, false); + /* Might be lapic_chip for irq 0 */ + if (chip->irq_set_affinity) + chip->irq_set_affinity(idata, mask, false); } } #endif -- To unsubscribe from this list: send the line "unsubscribe stable" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html