Commit 5daa49ef authored by Linas Vepstas's avatar Linas Vepstas Committed by James Bottomley

[SCSI] lpfc: avoid double-free during PCI error failure

If a PCI error is detected that cannot be recovered from, there
will be a double call of lpfc_pci_remove_one(), with the second call
resulting in a null-pointer dereference. The first call occurs in
lpfc_io_error_detected(), and the second call during pci device
remove. This patch eliminates the first call; its un-needed.
Signed-off-by: default avatarLinas Vepstas <linas@austin.ibm.com>
Acked-by: default avatarJames Smart <James.Smart@Emulex.Com>
Signed-off-by: default avatarJames Bottomley <James.Bottomley@SteelEye.com>
parent be521466
...@@ -1817,10 +1817,9 @@ static pci_ers_result_t lpfc_io_error_detected(struct pci_dev *pdev, ...@@ -1817,10 +1817,9 @@ static pci_ers_result_t lpfc_io_error_detected(struct pci_dev *pdev,
struct lpfc_sli *psli = &phba->sli; struct lpfc_sli *psli = &phba->sli;
struct lpfc_sli_ring *pring; struct lpfc_sli_ring *pring;
if (state == pci_channel_io_perm_failure) { if (state == pci_channel_io_perm_failure)
lpfc_pci_remove_one(pdev);
return PCI_ERS_RESULT_DISCONNECT; return PCI_ERS_RESULT_DISCONNECT;
}
pci_disable_device(pdev); pci_disable_device(pdev);
/* /*
* There may be I/Os dropped by the firmware. * There may be I/Os dropped by the firmware.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment