mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-12-05 01:54:09 +08:00
PCI: Print a debug message on PCI device release
Commit 6279504141
("PCI: enhance physical slot debug information") added
a debug print on releasing the PCI slot and another message on destroying
it. There is however no debug print on releasing the PCI device structure
itself and even with closely looking at the kernel log during hotplug
testing, I overlooked several missing pci_dev_put() calls for way too long.
Add a debug print in pci_release_dev() making it much easier to spot when
the PCI device structure is not released when it is supposed to be.
Link: https://lore.kernel.org/r/20210311132312.2882425-1-schnelle@linux.ibm.com
Signed-off-by: Niklas Schnelle <schnelle@linux.ibm.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
This commit is contained in:
parent
6efb943b86
commit
ea4aae0597
@ -2226,6 +2226,7 @@ static void pci_release_dev(struct device *dev)
|
||||
pci_bus_put(pci_dev->bus);
|
||||
kfree(pci_dev->driver_override);
|
||||
bitmap_free(pci_dev->dma_alias_mask);
|
||||
dev_dbg(dev, "device released\n");
|
||||
kfree(pci_dev);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user