Skip to content

Commit

Permalink
PCI: Leave normal LIST_POISON in deleted list entries
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Bjorn Helgaas <[email protected]>
Acked-by: Yinghai Lu <[email protected]>
  • Loading branch information
bjorn-helgaas committed Aug 22, 2012
1 parent d563e2c commit a7479d7
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions drivers/pci/remove.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit a7479d7

Please sign in to comment.