[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CABPRKS_bKK-6ph1ETQ1pLsY_KPPQBnCyBsqfd9V2JrOQXHQT7Q@mail.gmail.com>
Date: Tue, 26 Aug 2025 16:14:34 -0700
From: Justin Tee <justintee8345@...il.com>
To: John Evans <evans1210144@...il.com>
Cc: james.smart@...adcom.com, Justin Tee <justin.tee@...adcom.com>,
James.Bottomley@...senpartnership.com, martin.petersen@...cle.com,
linux-scsi@...r.kernel.org, linux-kernel@...r.kernel.org,
stable@...r.kernel.org
Subject: Re: [PATCH] scsi: lpfc: Fix buffer free/clear order in deferred
receive path
Hi John,
nvmebuf NULL ptr check is already performed earlier in this routine.
Maybe this patch should rather look like:
diff --git a/drivers/scsi/lpfc/lpfc_nvmet.c b/drivers/scsi/lpfc/lpfc_nvmet.c
index fba2e62027b7..cd527324eae7 100644
--- a/drivers/scsi/lpfc/lpfc_nvmet.c
+++ b/drivers/scsi/lpfc/lpfc_nvmet.c
@@ -1264,10 +1264,10 @@ lpfc_nvmet_defer_rcv(struct
nvmet_fc_target_port *tgtport,
atomic_inc(&tgtp->rcv_fcp_cmd_defer);
/* Free the nvmebuf since a new buffer already replaced it */
- nvmebuf->hrq->rqbp->rqb_free_buffer(phba, nvmebuf);
spin_lock_irqsave(&ctxp->ctxlock, iflag);
ctxp->rqb_buffer = NULL;
spin_unlock_irqrestore(&ctxp->ctxlock, iflag);
+ nvmebuf->hrq->rqbp->rqb_free_buffer(phba, nvmebuf);
}
Regards,
Justin Tee
Powered by blists - more mailing lists