Commit:     5daa49ef05c44ce94bed0bab0f9ba4a9e952863b
Parent:     be521466feb3bb1cd89de82a2b1d080e9ebd3cb6
Author:     Linas Vepstas <[EMAIL PROTECTED]>
AuthorDate: Thu Mar 8 16:19:11 2007 -0600
Committer:  James Bottomley <[EMAIL PROTECTED]>
CommitDate: Sun Mar 11 10:42:17 2007 -0500

    [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: Linas Vepstas <[EMAIL PROTECTED]>
    Acked-by: James Smart <[EMAIL PROTECTED]>
    Signed-off-by: James Bottomley <[EMAIL PROTECTED]>
 drivers/scsi/lpfc/lpfc_init.c |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/scsi/lpfc/lpfc_init.c b/drivers/scsi/lpfc/lpfc_init.c
index 9d014e5..057fd7e 100644
--- a/drivers/scsi/lpfc/lpfc_init.c
+++ b/drivers/scsi/lpfc/lpfc_init.c
@@ -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_ring  *pring;
-       if (state == pci_channel_io_perm_failure) {
-               lpfc_pci_remove_one(pdev);
+       if (state == pci_channel_io_perm_failure)
                return PCI_ERS_RESULT_DISCONNECT;
-       }
         * There may be I/Os dropped by the firmware.
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at

Reply via email to