]> git.baikalelectronics.ru Git - kernel.git/commit
PCI/MSI: Fix MSI IRQ domains for VFs on virtual buses
authorAlex Williamson <alex.williamson@redhat.com>
Fri, 18 Sep 2015 21:08:54 +0000 (15:08 -0600)
committerBjorn Helgaas <helgaas@kernel.org>
Thu, 24 Sep 2015 22:06:32 +0000 (17:06 -0500)
commit0344784fc5c0bae508fa2f668dd141b73c3d6fc7
tree9356d810f4575ff20e2615043de2005439202845
parente6fa45c92364c1101332176560806710df691c51
PCI/MSI: Fix MSI IRQ domains for VFs on virtual buses

SR-IOV creates a virtual bus where bus->self is NULL.  When we add VFs and
scan for an MSI domain, pci_set_bus_msi_domain() dereferences bus->self,
which causes a kernel NULL pointer dereference oops.

Scan up to the parent bus until we find a real bridge where we can get the
MSI domain.

[bhelgaas: changelog]
Fixes: 9499ff1a8a3b ("PCI/MSI: Add hooks to populate the msi_domain field")
Tested-by: Joerg Roedel <joro@8bytes.org>
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
Signed-off-by: Bjorn Helgaas <helgaas@kernel.org>
Acked-by: Marc Zyngier <marc.zyngier@arm.com>
drivers/pci/probe.c