Patch "bnx2x: fix page fault following EEH recovery" has been added to the 4.19-stable tree

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

 



This is a note to let you know that I've just added the patch titled

    bnx2x: fix page fault following EEH recovery

to the 4.19-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     bnx2x-fix-page-fault-following-eeh-recovery.patch
and it can be found in the queue-4.19 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit c3eb0e5651834df2788d3543f9feae9398cd33e6
Author: David Christensen <drc@xxxxxxxxxxxxxxxxxx>
Date:   Thu Jun 8 16:01:43 2023 -0400

    bnx2x: fix page fault following EEH recovery
    
    [ Upstream commit 7ebe4eda4265642859507d1b3ca330d8c196cfe5 ]
    
    In the last step of the EEH recovery process, the EEH driver calls into
    bnx2x_io_resume() to re-initialize the NIC hardware via the function
    bnx2x_nic_load().  If an error occurs during bnx2x_nic_load(), OS and
    hardware resources are released and an error code is returned to the
    caller.  When called from bnx2x_io_resume(), the return code is ignored
    and the network interface is brought up unconditionally.  Later attempts
    to send a packet via this interface result in a page fault due to a null
    pointer reference.
    
    This patch checks the return code of bnx2x_nic_load(), prints an error
    message if necessary, and does not enable the interface.
    
    Signed-off-by: David Christensen <drc@xxxxxxxxxxxxxxxxxx>
    Reviewed-by: Sridhar Samudrala <sridhar.samudrala@xxxxxxxxx>
    Signed-off-by: David S. Miller <davem@xxxxxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c
index 91ddde4d647c6..d21b22ed0b60a 100644
--- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c
+++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c
@@ -14464,11 +14464,16 @@ static void bnx2x_io_resume(struct pci_dev *pdev)
 	bp->fw_seq = SHMEM_RD(bp, func_mb[BP_FW_MB_IDX(bp)].drv_mb_header) &
 							DRV_MSG_SEQ_NUMBER_MASK;
 
-	if (netif_running(dev))
-		bnx2x_nic_load(bp, LOAD_NORMAL);
+	if (netif_running(dev)) {
+		if (bnx2x_nic_load(bp, LOAD_NORMAL)) {
+			netdev_err(bp->dev, "Error during driver initialization, try unloading/reloading the driver\n");
+			goto done;
+		}
+	}
 
 	netif_device_attach(dev);
 
+done:
 	rtnl_unlock();
 }
 



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux