+ lpfc-avoid-double-free-during-pci-error-failure.patch added to -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled
     lpfc: avoid double-free during PCI error failure
has been added to the -mm tree.  Its filename is
     lpfc-avoid-double-free-during-pci-error-failure.patch

*** Remember to use Documentation/SubmitChecklist when testing your code ***

See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find
out what to do about this

------------------------------------------------------
Subject: lpfc: avoid double-free during PCI error failure
From: linas@xxxxxxxxxxxxxx (Linas Vepstas)

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 <linas@xxxxxxxxxxxxxx>
Acked-by: James Smart <James.Smart@xxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

 drivers/scsi/lpfc/lpfc_init.c |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)

diff -puN drivers/scsi/lpfc/lpfc_init.c~lpfc-avoid-double-free-during-pci-error-failure drivers/scsi/lpfc/lpfc_init.c
--- a/drivers/scsi/lpfc/lpfc_init.c~lpfc-avoid-double-free-during-pci-error-failure
+++ a/drivers/scsi/lpfc/lpfc_init.c
@@ -1817,10 +1817,9 @@ static pci_ers_result_t lpfc_io_error_de
 	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;
-	}
+
 	pci_disable_device(pdev);
 	/*
 	 * There may be I/Os dropped by the firmware.
_

Patches currently in -mm which might be from linas@xxxxxxxxxxxxxx are

s2io-add-pci-error-recovery-support.patch
lpfc-avoid-double-free-during-pci-error-failure.patch

-
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Kernel Newbies FAQ]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux