From: Bart Van Assche <bvanassche@acm.org>
To: "Peter Wang (王信友)" <peter.wang@mediatek.com>,
"linux-scsi@vger.kernel.org" <linux-scsi@vger.kernel.org>,
"jejb@linux.ibm.com" <jejb@linux.ibm.com>,
"martin.petersen@oracle.com" <martin.petersen@oracle.com>
Cc: "linux-mediatek@lists.infradead.org"
<linux-mediatek@lists.infradead.org>
Subject: Re: [PATCH v1] ufs: core: Fix possible NULL pointer dereference in ufshcd_add_command_trace()
Date: Tue, 24 Feb 2026 08:48:58 -0800 [thread overview]
Message-ID: <72757f9f-20de-4fb8-b5eb-507dbcdbe22a@acm.org> (raw)
In-Reply-To: <399765bade9b7adcca89a94313e71635d1336172.camel@mediatek.com>
On 2/23/26 9:29 PM, Peter Wang (王信友) wrote:
> Therefore, there is no need to assign hwq_id separately.
Hi Peter,
That's not what I proposed. When ignoring the NULL test, this is what
the current ufshcd_add_command_trace() implementation does:
hwq_id = hba->uhq[READ_ONCE(req->mq_hctx)->queue_num].id;
That's more complicated than necessary. This should be sufficient
(again ignoring the NULL test):
hwq_id = READ_ONCE(req->mq_hctx)->queue_num;
Anyway, since the proposed change probably only results in a small
performance improvement, let's proceed with the current patch.
Bart.
next prev parent reply other threads:[~2026-02-24 16:49 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-23 6:56 [PATCH v1] ufs: core: Fix possible NULL pointer dereference in ufshcd_add_command_trace() peter.wang
2026-02-23 17:13 ` Bart Van Assche
2026-02-24 5:29 ` Peter Wang (王信友)
2026-02-24 16:48 ` Bart Van Assche [this message]
2026-02-25 5:53 ` Peter Wang (王信友)
2026-02-24 16:50 ` Bart Van Assche
2026-02-25 2:08 ` Martin K. Petersen
2026-02-25 19:45 ` Bart Van Assche
2026-02-28 22:37 ` Martin K. Petersen
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=72757f9f-20de-4fb8-b5eb-507dbcdbe22a@acm.org \
--to=bvanassche@acm.org \
--cc=jejb@linux.ibm.com \
--cc=linux-mediatek@lists.infradead.org \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.com \
--cc=peter.wang@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