Skip to content

Commit a7479d7

Browse files
committed
PCI: Leave normal LIST_POISON in deleted list entries
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>
1 parent d563e2c commit a7479d7

1 file changed

Lines changed: 0 additions & 3 deletions

File tree

‎drivers/pci/remove.c‎

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,8 @@ static void pci_stop_dev(struct pci_dev *dev)
3232

3333
static void pci_destroy_dev(struct pci_dev *dev)
3434
{
35-
/* Remove the device from the device lists, and prevent any further
36-
* list accesses from this device */
3735
down_write(&pci_bus_sem);
3836
list_del(&dev->bus_list);
39-
dev->bus_list.next = dev->bus_list.prev = NULL;
4037
up_write(&pci_bus_sem);
4138

4239
pci_free_resources(dev);

0 commit comments

Comments
 (0)