From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752345AbeAQHe3 (ORCPT + 1 other); Wed, 17 Jan 2018 02:34:29 -0500 Received: from Galois.linutronix.de ([146.0.238.70]:45031 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752142AbeAQHe1 (ORCPT ); Wed, 17 Jan 2018 02:34:27 -0500 Date: Wed, 17 Jan 2018 08:34:22 +0100 (CET) From: Thomas Gleixner To: Keith Busch cc: LKML Subject: Re: [BUG 4.15-rc7] IRQ matrix management errors In-Reply-To: <20180117022511.GD6259@localhost.localdomain> Message-ID: References: <20180115025759.GG13580@localhost.localdomain> <20180115030255.GA13921@localhost.localdomain> <20180116061641.GB32639@localhost.localdomain> <20180116071145.GA5643@localhost.localdomain> <20180117022511.GD6259@localhost.localdomain> User-Agent: Alpine 2.20 (DEB 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-Linutronix-Spam-Score: -1.0 X-Linutronix-Spam-Level: - X-Linutronix-Spam-Status: No , -1.0 points, 5.0 required, ALL_TRUSTED=-1,SHORTCIRCUIT=-0.0001 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: On Tue, 16 Jan 2018, Keith Busch wrote: > On Tue, Jan 16, 2018 at 12:20:18PM +0100, Thomas Gleixner wrote: > > 8<---------------------- > > diff --git a/arch/x86/kernel/apic/vector.c b/arch/x86/kernel/apic/vector.c > > index f8b03bb8e725..3cc471beb50b 100644 > > --- a/arch/x86/kernel/apic/vector.c > > +++ b/arch/x86/kernel/apic/vector.c > > @@ -542,14 +542,17 @@ static int x86_vector_alloc_irqs(struct irq_domain *domain, unsigned int virq, > > > > err = assign_irq_vector_policy(irqd, info); > > trace_vector_setup(virq + i, false, err); > > - if (err) > > + if (err) { > > + irqd->chip_data = NULL; > > + free_apic_chip_data(apicd); > > goto error; > > + } > > } > > > > return 0; > > > > error: > > - x86_vector_free_irqs(domain, virq, i + 1); > > + x86_vector_free_irqs(domain, virq, i); > > return err; > > } > > > > The patch does indeed fix all the warnings and allows device binding to > succeed, albeit in a degraded performance mode. Despite that, this is > a good fix, and looks applicable to 4.4-stable, so: > > Tested-by: Keith Busch > > I'm still concerned assign_irq_vector_policy is failing. That has > interrupt allocation abandon MSI-x and fall back to legacy IRQ. Can you trace the matrix allocations from the very beginning or tell me how to reproduce. I'd like to figure out why this is happening. > Your patch does address my main concern, though. Are you comfortable > enough to queue this up for 4.15? Yes, it's a pretty obvious bug and the fix is straight forward. Thanks, tglx