mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Bart Van Assche <bvanassche@acm.org>
To: Stanley Jhu <stanleyjhu@google.com>,
	"Martin K . Petersen" <martin.petersen@oracle.com>,
	Bean Huo <beanhuo@micron.com>
Cc: Alim Akhtar <alim.akhtar@samsung.com>,
	Avri Altman <avri.altman@wdc.com>,
	"James E . J . Bottomley" <James.Bottomley@HansenPartnership.com>,
	Manivannan Sadhasivam <mani@kernel.org>,
	Peter Wang <peter.wang@mediatek.com>,
	linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org,
	stable@vger.kernel.org
Subject: Re: [PATCH v3 1/2] scsi: ufs: core: Avoid unsafe MMIO reads in ufshcd_mcq_compl_all_cqes_lock()
Date: Mon, 28 Sep 2026 10:45:17 -0700	[thread overview]
Message-ID: <3da87b3a-4260-4b6b-aae2-b741d524e665@acm.org> (raw)
In-Reply-To: <20260928035816.1294326-2-stanleyjhu@google.com>

On 9/27/26 8:58 PM, Stanley Jhu wrote:
> Fix both issues in ufshcd_mcq_compl_all_cqes_lock():
> - Remove the ufshcd_mcq_update_cq_tail_slot() call and the redundant
>    hwq->cq_head_slot = hwq->cq_tail_slot assignment without
>    replacement. The two indices are already equal after the sweep: they
>    are equal when the sweep starts, since ufshcd_mcq_poll_cqe_lock()
>    consumes entries until cq_head_slot reaches cq_tail_slot, and the
>    sweep advances cq_head_slot by exactly one full ring. Both indices
>    are also reinitialized before the queue is reused.
> - Extract ufshcd_mcq_compl_cqe() and invoke it only on non-empty slots
>    during full-ring sweeps, keeping "Abnormal CQ entry!" logging strictly
>    for unexpected empty entries in ufshcd_mcq_poll_cqe_lock().

Reviewed-by: Bart Van Assche <bvanassche@acm.org>

  reply	other threads:[~2026-09-28 17:45 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-28  3:58 [PATCH v3 0/2] scsi: ufs: core: Fix unsafe MMIO reads and redundant CQ sweeps in MCQ reset Stanley Jhu
2026-09-28  3:58 ` [PATCH v3 1/2] scsi: ufs: core: Avoid unsafe MMIO reads in ufshcd_mcq_compl_all_cqes_lock() Stanley Jhu
2026-09-28 17:45   ` Bart Van Assche [this message]
2026-09-28  3:58 ` [PATCH v3 2/2] scsi: ufs: core: Decouple CQ sweep from request iterator in MCQ Stanley Jhu

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=3da87b3a-4260-4b6b-aae2-b741d524e665@acm.org \
    --to=bvanassche@acm.org \
    --cc=James.Bottomley@HansenPartnership.com \
    --cc=alim.akhtar@samsung.com \
    --cc=avri.altman@wdc.com \
    --cc=beanhuo@micron.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=mani@kernel.org \
    --cc=martin.petersen@oracle.com \
    --cc=peter.wang@mediatek.com \
    --cc=stable@vger.kernel.org \
    --cc=stanleyjhu@google.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

all inboxes | Powered by JetHome®