[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <68dea32f-e1c9-4e17-902a-aadc0a8489f7@acm.org>
Date: Mon, 14 Apr 2025 09:27:38 -0700
From: Bart Van Assche <bvanassche@....org>
To: Chenyuan Yang <chenyuan0y@...il.com>, alim.akhtar@...sung.com,
avri.altman@....com, James.Bottomley@...senPartnership.com,
martin.petersen@...cle.com, peter.wang@...iatek.com,
manivannan.sadhasivam@...aro.org, stanley.chu@...iatek.com,
quic_cang@...cinc.com, quic_nguyenb@...cinc.com
Cc: linux-scsi@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] scsi: ufs: core: Add NULL check in
ufshcd_mcq_compl_pending_transfer()
On 4/12/25 12:59 PM, Chenyuan Yang wrote:
> Add a NULL check for the returned hwq pointer by ufshcd_mcq_req_to_hwq().
>
> This is similar to the fix in commit 74736103fb41
> ("scsi: ufs: core: Fix ufshcd_abort_one racing issue").
>
> Signed-off-by: Chenyuan Yang <chenyuan0y@...il.com>
> Fixes: ab248643d3d6 ("scsi: ufs: core: Add error handling for MCQ mode")
> ---
> drivers/ufs/core/ufshcd.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/drivers/ufs/core/ufshcd.c b/drivers/ufs/core/ufshcd.c
> index 0534390c2a35..fd39e10c2043 100644
> --- a/drivers/ufs/core/ufshcd.c
> +++ b/drivers/ufs/core/ufshcd.c
> @@ -5692,6 +5692,8 @@ static void ufshcd_mcq_compl_pending_transfer(struct ufs_hba *hba,
> continue;
>
> hwq = ufshcd_mcq_req_to_hwq(hba, scsi_cmd_to_rq(cmd));
> + if (!hwq)
> + continue;
>
> if (force_compl) {
> ufshcd_mcq_compl_all_cqes_lock(hba, hwq);
Reviewed-by: Bart Van Assche <bvanassche@....org>
Powered by blists - more mailing lists