lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20210920163925.737206408@linuxfoundation.org>
Date:   Mon, 20 Sep 2021 18:44:22 +0200
From:   Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To:     linux-kernel@...r.kernel.org
Cc:     Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        stable@...r.kernel.org,
        Rafał Miłecki <zajec5@...il.com>,
        Rafał Miłecki <rafal@...ecki.pl>,
        Rob Herring <robh@...nel.org>,
        Lorenzo Pieralisi <lorenzo.pieralisi@....com>,
        Bjorn Helgaas <bhelgaas@...gle.com>,
        Srinath Mannam <srinath.mannam@...adcom.com>,
        Roman Bacik <roman.bacik@...adcom.com>,
        Bharat Gooty <bharat.gooty@...adcom.com>,
        Abhishek Shah <abhishek.shah@...adcom.com>,
        Jitendra Bhivare <jitendra.bhivare@...adcom.com>,
        Ray Jui <ray.jui@...adcom.com>,
        Florian Fainelli <f.fainelli@...il.com>,
        BCM Kernel Feedback <bcm-kernel-feedback-list@...adcom.com>,
        Scott Branden <sbranden@...adcom.com>,
        Sasha Levin <sashal@...nel.org>
Subject: [PATCH 5.14 124/168] PCI: of: Dont fail devm_pci_alloc_host_bridge() on missing ranges

From: Rob Herring <robh@...nel.org>

[ Upstream commit d277f6e88c88729b1d57d40bbfb00d0bfc961972 ]

Commit 669cbc708122 ("PCI: Move DT resource setup into
devm_pci_alloc_host_bridge()") made devm_pci_alloc_host_bridge() fail on
any DT resource parsing errors, but Broadcom iProc uses
devm_pci_alloc_host_bridge() on BCMA bus devices that don't have DT
resources. In particular, there is no 'ranges' property. Fix iProc by
making 'ranges' optional.

If 'ranges' is required by a platform, there's going to be more errors
latter on if it is missing.

Link: https://lore.kernel.org/r/20210803215656.3803204-1-robh@kernel.org
Fixes: 669cbc708122 ("PCI: Move DT resource setup into devm_pci_alloc_host_bridge()")
Reported-by: Rafał Miłecki <zajec5@...il.com>
Tested-by: Rafał Miłecki <rafal@...ecki.pl>
Signed-off-by: Rob Herring <robh@...nel.org>
Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@....com>
Acked-by: Bjorn Helgaas <bhelgaas@...gle.com>
Cc: Srinath Mannam <srinath.mannam@...adcom.com>
Cc: Roman Bacik <roman.bacik@...adcom.com>
Cc: Bharat Gooty <bharat.gooty@...adcom.com>
Cc: Abhishek Shah <abhishek.shah@...adcom.com>
Cc: Jitendra Bhivare <jitendra.bhivare@...adcom.com>
Cc: Ray Jui <ray.jui@...adcom.com>
Cc: Florian Fainelli <f.fainelli@...il.com>
Cc: BCM Kernel Feedback <bcm-kernel-feedback-list@...adcom.com>
Cc: Scott Branden <sbranden@...adcom.com>
Cc: Bjorn Helgaas <bhelgaas@...gle.com>
Cc: Lorenzo Pieralisi <lorenzo.pieralisi@....com>
Signed-off-by: Sasha Levin <sashal@...nel.org>
---
 drivers/pci/of.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/pci/of.c b/drivers/pci/of.c
index a143b02b2dcd..d84381ce82b5 100644
--- a/drivers/pci/of.c
+++ b/drivers/pci/of.c
@@ -310,7 +310,7 @@ static int devm_of_pci_get_host_bridge_resources(struct device *dev,
 	/* Check for ranges property */
 	err = of_pci_range_parser_init(&parser, dev_node);
 	if (err)
-		goto failed;
+		return 0;
 
 	dev_dbg(dev, "Parsing ranges property...\n");
 	for_each_of_pci_range(&parser, &range) {
-- 
2.30.2



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ