diff options
| author | Sizhe Liu <liusizhe5@huawei.com> | 2026-03-11 14:52:11 -0500 |
|---|---|---|
| committer | Bjorn Helgaas <bhelgaas@google.com> | 2026-03-16 16:01:51 -0500 |
| commit | a1ed752bc7cb77b740cee671567d9508ae74becd (patch) | |
| tree | aa8a3e3e70e2e5401a44b8f4c05ebc2329a7e800 /drivers | |
| parent | 6de23f81a5e08be8fbf5e8d7e9febc72a5b5f27f (diff) | |
PCI/DPC: Hold pci_dev reference during error recovery
The AER and EDR error handling paths hold a reference on the pci_dev during
recovery. Hold a reference during the DPC recovery path as well.
Signed-off-by: Sizhe Liu <liusizhe5@huawei.com>
[bhelgaas: split to separate patch]
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
https://patch.msgid.link/20260214081130.1878424-1-liusizhe5@huawei.com
Diffstat (limited to 'drivers')
| -rw-r--r-- | drivers/pci/pcie/dpc.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/pci/pcie/dpc.c b/drivers/pci/pcie/dpc.c index fc18349614d7..f028bc795f19 100644 --- a/drivers/pci/pcie/dpc.c +++ b/drivers/pci/pcie/dpc.c @@ -372,11 +372,13 @@ static irqreturn_t dpc_handler(int irq, void *context) return IRQ_HANDLED; } + pci_dev_get(pdev); dpc_process_error(pdev); /* We configure DPC so it only triggers on ERR_FATAL */ pcie_do_recovery(pdev, pci_channel_io_frozen, dpc_reset_link); + pci_dev_put(pdev); return IRQ_HANDLED; } |
