PCI: Leave normal LIST_POISON in deleted list entries
authorBjorn Helgaas <bhelgaas@google.com>
Fri, 17 Aug 2012 03:12:38 +0000 (21:12 -0600)
committerBjorn Helgaas <bhelgaas@google.com>
Wed, 22 Aug 2012 17:34:38 +0000 (11:34 -0600)
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.

Tested-by: Yijing Wang <wangyijing@huawei.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Acked-by: Yinghai Lu <yinghai@kernel.org>
drivers/pci/remove.c

index c01bacad9fd9f631d05d2037c933667874ffa8d3..4f9ca9162895edd8216fda36e055949541d44012 100644 (file)
@@ -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);
This page took 0.024546 seconds and 5 git commands to generate.