bcm53xx: fix memory corruption caused by iproc PCE controller driver
[openwrt/staging/florian.git] / target / linux / bcm53xx / patches-4.9 / 800-Revert-PCI-iproc-Request-host-bridge-window-resource.patch
1 From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <rafal@milecki.pl>
2 Date: Thu, 9 Mar 2017 10:53:06 +0100
3 Subject: [PATCH] Revert "PCI: iproc: Request host bridge window resources"
4 MIME-Version: 1.0
5 Content-Type: text/plain; charset=UTF-8
6 Content-Transfer-Encoding: 8bit
7
8 This reverts commit c3245a566400 ("PCI: iproc: Request host bridge
9 window resources"). It was passing local variable of
10 iproc_pcie_bcma_probe to the devm_request_pci_bus_resources. It meant
11 using unallocated memory for tracing resource which could easily result
12 in corruption and crashes.
13
14 Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
15 ---
16
17 --- a/drivers/pci/host/pcie-iproc.c
18 +++ b/drivers/pci/host/pcie-iproc.c
19 @@ -462,9 +462,6 @@ int iproc_pcie_setup(struct iproc_pcie *
20 struct pci_bus *bus;
21
22 dev = pcie->dev;
23 - ret = devm_request_pci_bus_resources(dev, res);
24 - if (ret)
25 - return ret;
26
27 ret = phy_init(pcie->phy);
28 if (ret) {