aboutsummaryrefslogtreecommitdiff
path: root/scripts/gdb
diff options
context:
space:
mode:
authorLogan Gunthorpe <[email protected]>2021-06-10 10:06:09 -0600
committerBjorn Helgaas <[email protected]>2021-06-10 18:01:55 -0500
commit3ec0c3ec2d92c09465534a1ff9c6f9d9506ffef6 (patch)
treeabb619a1489102d96b3a4222e0f73b7205818821 /scripts/gdb
parent7e2faa1710c408712185bb6463eaa0ee4776350f (diff)
PCI/P2PDMA: Avoid pci_get_slot(), which may sleep
In order to use upstream_bridge_distance_warn() from a dma_map function, it must not sleep. However, pci_get_slot() takes the pci_bus_sem so it might sleep. In order to avoid this, try to get the host bridge's device from the first element in the device list. It should be impossible for the host bridge's device to go away while references are held on child devices, so the first element should not be able to change and, thus, this should be safe. Introduce a static function called pci_host_bridge_dev() to obtain the host bridge's root device. Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Logan Gunthorpe <[email protected]> Signed-off-by: Bjorn Helgaas <[email protected]>
Diffstat (limited to 'scripts/gdb')
0 files changed, 0 insertions, 0 deletions