From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.linuxfoundation.org ([140.211.169.12]:60162 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754475AbeDIUFx (ORCPT ); Mon, 9 Apr 2018 16:05:53 -0400 Subject: Patch "PCI/msi: fix the pci_alloc_irq_vectors_affinity stub" has been added to the 4.9-stable tree To: hch@lst.de, alexander.levin@microsoft.com, gregkh@linuxfoundation.org, rostedt@goodmis.org, torvalds@linux-foundation.org Cc: , From: Date: Mon, 09 Apr 2018 21:59:10 +0200 Message-ID: <152330395019023@kroah.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ANSI_X3.4-1968 Content-Transfer-Encoding: 8bit Sender: stable-owner@vger.kernel.org List-ID: This is a note to let you know that I've just added the patch titled PCI/msi: fix the pci_alloc_irq_vectors_affinity stub to the 4.9-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: pci-msi-fix-the-pci_alloc_irq_vectors_affinity-stub.patch and it can be found in the queue-4.9 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let know about it. >>From foo@baz Mon Apr 9 17:09:24 CEST 2018 From: Christoph Hellwig Date: Sat, 20 May 2017 18:59:54 +0200 Subject: PCI/msi: fix the pci_alloc_irq_vectors_affinity stub From: Christoph Hellwig [ Upstream commit 83b4605b0c16cde5b00c8cf192408d51eab75402 ] We need to return an error for any call that asks for MSI / MSI-X vectors only, so that non-trivial fallback logic can work properly. Also valid dev->irq and use the "correct" errno value based on feedback from Linus. Signed-off-by: Christoph Hellwig Reported-by: Steven Rostedt Fixes: aff17164 ("PCI: Provide sensible IRQ vector alloc/free routines") Signed-off-by: Linus Torvalds Signed-off-by: Sasha Levin Signed-off-by: Greg Kroah-Hartman --- include/linux/pci.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) --- a/include/linux/pci.h +++ b/include/linux/pci.h @@ -1348,9 +1348,9 @@ static inline int pci_alloc_irq_vectors( unsigned int min_vecs, unsigned int max_vecs, unsigned int flags) { - if (min_vecs > 1) - return -EINVAL; - return 1; + if ((flags & PCI_IRQ_LEGACY) && min_vecs == 1 && dev->irq) + return 1; + return -ENOSPC; } static inline void pci_free_irq_vectors(struct pci_dev *dev) { Patches currently in stable-queue which might be from hch@lst.de are queue-4.9/nvme-pci-fix-multiple-ctrl-removal-scheduling.patch queue-4.9/bio-integrity-do-not-allocate-integrity-context-for-bio-w-o-data.patch queue-4.9/scsi-libsas-initialize-sas_phy-status-according-to-response-of-discover.patch queue-4.9/nvme-fix-hang-in-remove-path.patch queue-4.9/scsi-libsas-fix-error-when-getting-phy-events.patch queue-4.9/ib-srpt-avoid-that-aborting-a-command-triggers-a-kernel-warning.patch queue-4.9/blk-mq-fix-race-between-updating-nr_hw_queues-and-switching-io-sched.patch queue-4.9/pci-msi-fix-the-pci_alloc_irq_vectors_affinity-stub.patch queue-4.9/scsi-libsas-fix-memory-leak-in-sas_smp_get_phy_events.patch queue-4.9/ib-srpt-fix-abort-handling.patch