Patchwork [v2,11/16] PCI: Leave normal LIST_POISON in deleted list entries

login
register
mail settings
Submitter Bjorn Helgaas
Date Aug. 17, 2012, 11:36 p.m.
Message ID <20120817233641.10973.93668.stgit@bhelgaas.mtv.corp.google.com>
Download mbox | patch
Permalink /patch/178416/
State Superseded
Headers show

Comments

Bjorn Helgaas - Aug. 17, 2012, 11:36 p.m.
list_del() already sets next/prev to LIST_POISON1/LIST_POISON2, so we
don't need to do anything special here to prevent further list accesses.

Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
---
 drivers/pci/remove.c |    3 ---
 1 files changed, 0 insertions(+), 3 deletions(-)


--
To unsubscribe from this list: send the line "unsubscribe linux-pci" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Patch

diff --git a/drivers/pci/remove.c b/drivers/pci/remove.c
index c01baca..4f9ca91 100644
--- a/drivers/pci/remove.c
+++ b/drivers/pci/remove.c
@@ -32,11 +32,8 @@  static void pci_stop_dev(struct pci_dev *dev)
 
 static void pci_destroy_dev(struct pci_dev *dev)
 {
-	/* Remove the device from the device lists, and prevent any further
-	 * list accesses from this device */
 	down_write(&pci_bus_sem);
 	list_del(&dev->bus_list);
-	dev->bus_list.next = dev->bus_list.prev = NULL;
 	up_write(&pci_bus_sem);
 
 	pci_free_resources(dev);