Patch "scsi: lpfc: Add ELS_RSP cmd to the list of WQEs to flush in lpfc_els_flush_cmd()" has been added to the 6.1-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

    scsi: lpfc: Add ELS_RSP cmd to the list of WQEs to flush in lpfc_els_flush_cmd()

to the 6.1-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:
     scsi-lpfc-add-els_rsp-cmd-to-the-list-of-wqes-to-flu.patch
and it can be found in the queue-6.1 subdirectory.

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



commit 0a3a17add38f5ffb406cfa74303d92d2fba2650b
Author: Justin Tee <justin.tee@xxxxxxxxxxxx>
Date:   Thu Sep 12 16:24:40 2024 -0700

    scsi: lpfc: Add ELS_RSP cmd to the list of WQEs to flush in lpfc_els_flush_cmd()
    
    [ Upstream commit 93bcc5f3984bf4f51da1529700aec351872dbfff ]
    
    During HBA stress testing, a spam of received PLOGIs exposes a resource
    recovery bug causing leakage of lpfc_sqlq entries from the global
    phba->sli4_hba.lpfc_els_sgl_list.
    
    The issue is in lpfc_els_flush_cmd(), where the driver attempts to recover
    outstanding ELS sgls when walking the txcmplq.  Only CMD_ELS_REQUEST64_CRs
    and CMD_GEN_REQUEST64_CRs are added to the abort and cancel lists.  A check
    for CMD_XMIT_ELS_RSP64_WQE is missing in order to recover LS_ACC usages of
    the phba->sli4_hba.lpfc_els_sgl_list too.
    
    Fix by adding CMD_XMIT_ELS_RSP64_WQE as part of the txcmplq walk when
    adding WQEs to the abort and cancel list in lpfc_els_flush_cmd().  Also,
    update naming convention from CRs to WQEs.
    
    Signed-off-by: Justin Tee <justin.tee@xxxxxxxxxxxx>
    Link: https://lore.kernel.org/r/20240912232447.45607-2-justintee8345@xxxxxxxxx
    Signed-off-by: Martin K. Petersen <martin.petersen@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/scsi/lpfc/lpfc_els.c b/drivers/scsi/lpfc/lpfc_els.c
index a8dd142e832a0..b4afaed5e4879 100644
--- a/drivers/scsi/lpfc/lpfc_els.c
+++ b/drivers/scsi/lpfc/lpfc_els.c
@@ -9455,11 +9455,12 @@ lpfc_els_flush_cmd(struct lpfc_vport *vport)
 		if (piocb->cmd_flag & LPFC_DRIVER_ABORTED && !mbx_tmo_err)
 			continue;
 
-		/* On the ELS ring we can have ELS_REQUESTs or
-		 * GEN_REQUESTs waiting for a response.
+		/* On the ELS ring we can have ELS_REQUESTs, ELS_RSPs,
+		 * or GEN_REQUESTs waiting for a CQE response.
 		 */
 		ulp_command = get_job_cmnd(phba, piocb);
-		if (ulp_command == CMD_ELS_REQUEST64_CR) {
+		if (ulp_command == CMD_ELS_REQUEST64_WQE ||
+		    ulp_command == CMD_XMIT_ELS_RSP64_WQE) {
 			list_add_tail(&piocb->dlist, &abort_list);
 
 			/* If the link is down when flushing ELS commands




[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