From: Bart Van Assche <bvanassche@acm.org>
To: Chenyuan Yang <chenyuan0y@gmail.com>,
alim.akhtar@samsung.com, avri.altman@wdc.com,
James.Bottomley@HansenPartnership.com,
martin.petersen@oracle.com, peter.wang@mediatek.com,
manivannan.sadhasivam@linaro.org, stanley.chu@mediatek.com,
quic_cang@quicinc.com, quic_nguyenb@quicinc.com
Cc: linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] scsi: ufs: core: Add NULL check in ufshcd_mcq_compl_pending_transfer()
Date: Mon, 14 Apr 2025 09:27:38 -0700 [thread overview]
Message-ID: <68dea32f-e1c9-4e17-902a-aadc0a8489f7@acm.org> (raw)
In-Reply-To: <20250412195909.315418-1-chenyuan0y@gmail.com>
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@gmail.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@acm.org>
prev parent reply other threads:[~2025-04-14 16:27 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-12 19:59 [PATCH] scsi: ufs: core: Add NULL check in ufshcd_mcq_compl_pending_transfer() Chenyuan Yang
2025-04-14 3:50 ` Peter Wang (王信友)
2025-04-14 16:27 ` Bart Van Assche [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=68dea32f-e1c9-4e17-902a-aadc0a8489f7@acm.org \
--to=bvanassche@acm.org \
--cc=James.Bottomley@HansenPartnership.com \
--cc=alim.akhtar@samsung.com \
--cc=avri.altman@wdc.com \
--cc=chenyuan0y@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=manivannan.sadhasivam@linaro.org \
--cc=martin.petersen@oracle.com \
--cc=peter.wang@mediatek.com \
--cc=quic_cang@quicinc.com \
--cc=quic_nguyenb@quicinc.com \
--cc=stanley.chu@mediatek.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox