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-next>] [day] [month] [year] [list]
Date:	Tue,  7 May 2013 16:29:31 -0700
From:	Yinghai Lu <yinghai@...nel.org>
To:	Bjorn Helgaas <bhelgaas@...gle.com>,
	Doug Thompson <dougthompson@...ssion.com>
Cc:	linux-pci@...r.kernel.org, linux-edac@...r.kernel.org,
	linux-kernel@...r.kernel.org, Yinghai Lu <yinghai@...nel.org>
Subject: [PATCH] PCI, EDAC: fix ordering assign resource and bus_add

We should assign unassigned resource before pci_bus_add_device.

as late one will enable driver and create sysfs file that will need
pci io resources from assign unassigned code.

Signed-off-by: Yinghai Lu <yinghai@...nel.org>

---
 drivers/edac/i82875p_edac.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Index: linux-2.6/drivers/edac/i82875p_edac.c
===================================================================
--- linux-2.6.orig/drivers/edac/i82875p_edac.c
+++ linux-2.6/drivers/edac/i82875p_edac.c
@@ -293,13 +293,14 @@ static int i82875p_setup_overfl_dev(stru
 		if (dev == NULL)
 			return 1;
 
+		pci_bus_assign_resources(dev->bus);
+
 		err = pci_bus_add_device(dev);
 		if (err) {
 			i82875p_printk(KERN_ERR,
 				"%s(): pci_bus_add_device() Failed\n",
 				__func__);
 		}
-		pci_bus_assign_resources(dev->bus);
 	}
 
 	*ovrfl_pdev = dev;
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ