linux-uconsole/drivers/pci/controller
Niklas Cassel 186d51d4fa PCI: dwc: Fix find_next_bit() usage
commit 1137e61dcb upstream.

find_next_bit() takes a parameter of size long, and performs arithmetic
that assumes that the argument is of size long.

Therefore we cannot pass a u32, since this will cause find_next_bit()
to read outside the stack buffer and will produce the following print:
BUG: KASAN: stack-out-of-bounds in find_next_bit+0x38/0xb0

Fixes: 1b497e6493 ("PCI: dwc: Fix uninitialized variable in dw_handle_msi_irq()")
Tested-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Signed-off-by: Niklas Cassel <niklas.cassel@linaro.org>
Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Reviewed-by: Andrew Murray <andrew.murray@arm.com>
Acked-by: Gustavo Pimentel <gustavo.pimentel@synopsys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-01-17 19:47:08 +01:00
..
dwc PCI: dwc: Fix find_next_bit() usage 2020-01-17 19:47:08 +01:00
Kconfig
Makefile
pci-aardvark.c
pci-ftpci100.c
pci-host-common.c
pci-host-generic.c
pci-hyperv.c PCI: hv: Avoid use of hv_pci_dev->pci_slot after freeing it 2019-10-01 08:26:09 +02:00
pci-mvebu.c
pci-rcar-gen2.c
pci-tegra.c PCI: tegra: Enable Relaxed Ordering only for Tegra20 & Tegra30 2019-11-12 19:20:52 +01:00
pci-thunder-ecam.c
pci-thunder-pem.c
pci-v3-semi.c
pci-versatile.c
pci-xgene-msi.c
pci-xgene.c
pcie-altera-msi.c
pcie-altera.c
pcie-cadence-ep.c PCI: cadence: Write MSI data with 32bits 2019-12-01 09:16:15 +01:00
pcie-cadence-host.c
pcie-cadence.c PCI: cadence: Correct probe behaviour when failing to get PHY 2018-11-13 11:08:35 -08:00
pcie-cadence.h
pcie-iproc-bcma.c
pcie-iproc-msi.c
pcie-iproc-platform.c
pcie-iproc.c
pcie-iproc.h
pcie-mediatek.c PCI: mediatek: Fixup MSI enablement logic by enabling MSI before clocks 2019-12-01 09:16:30 +01:00
pcie-mobiveil.c PCI: mobiveil: Use the 1st inbound window for MEM inbound transactions 2019-07-31 07:27:06 +02:00
pcie-rcar.c PCI: rcar: Fix missing MACCTLR register setting in initialization sequence 2019-12-17 20:35:54 +01:00
pcie-rockchip-ep.c
pcie-rockchip-host.c PCI: rockchip: Propagate errors for optional regulators 2019-10-07 18:57:12 +02:00
pcie-rockchip.c
pcie-rockchip.h
pcie-tango.c
pcie-xilinx-nwl.c PCI: xilinx-nwl: Fix Multi MSI data programming 2019-07-31 07:27:02 +02:00
pcie-xilinx.c PCI: xilinx: Check for __get_free_pages() failure 2019-06-15 11:54:10 +02:00
vmd.c PCI: vmd: Detach resources after stopping root bus 2019-12-01 09:16:37 +01:00