linux/drivers/pci/host
Ray Jui 8c125f3913 PCI: iproc: Fix NULL pointer dereference for BCMA
commit 3b65ca50d2 upstream.

With the inbound DMA mapping supported added, the iProc PCIe driver
parses DT property "dma-ranges" through call to
"of_pci_dma_range_parser_init()". In the case of BCMA, this results in a
NULL pointer deference due to a missing of_node.

Fix this by adding a guard in pcie-iproc-platform.c to only enable the
inbound DMA mapping logic when DT property "dma-ranges" is present.

Fixes: dd9d4e7498 ("PCI: iproc: Add inbound DMA mapping support")
Reported-by: Rafał Miłecki <rafal@milecki.pl>
Signed-off-by: Ray Jui <ray.jui@broadcom.com>
[lorenzo.pieralisi@arm.com: updated commit log]
Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Tested-by: Rafał Miłecki <rafal@milecki.pl>
cc: <stable@vger.kernel.org> # 4.10+
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
History 2018-02-22 15:42:27 +01:00
..
Kconfig Merge branch 'pci/host-xilinx' into next 2017-09-07 13:24:11 -05:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
pci-aardvark.c PCI: aardvark: Move to struct pci_host_bridge IRQ mapping functions 2017-10-10 21:17:43 -05:00
pci-ftpci100.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
pci-host-common.c PCI: generic: Drop pci_fixup_irqs() 2017-07-02 16:51:19 -05:00
pci-host-generic.c PCI: Don't allow unbinding host controllers that aren't prepared 2017-04-28 10:38:00 -05:00
pci-hyperv.c PCI: hv: Use effective affinity mask 2017-11-30 08:40:41 +00:00
pci-mvebu.c Merge branch 'pci/misc' into next 2017-09-07 13:24:16 -05:00
pci-rcar-gen2.c PCI: rcar-gen2: Make of_device_ids const 2017-07-02 18:45:31 -05:00
pci-tegra.c Revert "PCI: tegra: Do not allocate MSI target memory" 2017-10-10 19:06:16 -05:00
pci-thunder-ecam.c PCI: Don't allow unbinding host controllers that aren't prepared 2017-04-28 10:38:00 -05:00
pci-thunder-pem.c PCI: Don't allow unbinding host controllers that aren't prepared 2017-04-28 10:38:00 -05:00
pci-versatile.c PCI: versatile: Add local struct device pointers 2017-07-02 18:46:43 -05:00
pci-xgene-msi.c PCI: xgene: Fix platform_get_irq() error handling 2017-09-07 08:52:42 -05:00
pci-xgene.c PCI: xgene: Clean up whitespace 2017-09-07 08:52:43 -05:00
pcie-altera-msi.c PCI: altera: Fix platform_get_irq() error handling 2017-09-05 13:36:28 -05:00
pcie-altera.c PCI: altera: Fix platform_get_irq() error handling 2017-09-05 13:36:28 -05:00
pcie-iproc-bcma.c PCI: iproc: Convert PCI scan API to pci_scan_root_bus_bridge() 2017-07-02 16:14:24 -05:00
pcie-iproc-msi.c PCI: iproc: Remove unused struct iproc_pcie *pcie 2017-07-31 14:32:47 -05:00
pcie-iproc-platform.c PCI: iproc: Fix NULL pointer dereference for BCMA 2018-02-22 15:42:27 +01:00
pcie-iproc.c PCI: iproc: Fix NULL pointer dereference for BCMA 2018-02-22 15:42:27 +01:00
pcie-iproc.h PCI: iproc: Fix NULL pointer dereference for BCMA 2018-02-22 15:42:27 +01:00
pcie-mediatek.c PCI: mediatek: Use PCI_NUM_INTX 2017-08-30 08:23:59 -05:00
pcie-rcar.c PCI: rcar: Fix memory leak when no PCIe card is inserted 2017-08-15 17:51:59 -05:00
pcie-rockchip.c Merge branch 'pci/trivial' into next 2017-09-07 13:24:20 -05:00
pcie-tango.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
pcie-xilinx-nwl.c PCI: xilinx-nwl: Fix platform_get_irq() error handling 2017-09-05 13:41:13 -05:00
pcie-xilinx.c Merge branch 'pci/trivial' into next 2017-09-07 13:24:20 -05:00
vmd.c PCI: vmd: Remove IRQ affinity so we can allocate more IRQs 2017-08-30 16:18:38 -05:00