From: "Peter Wang (王信友)" <peter.wang@mediatek.com>
To: "bvanassche@acm.org" <bvanassche@acm.org>,
"martin.petersen@oracle.com" <martin.petersen@oracle.com>
Cc: "beanhuo@micron.com" <beanhuo@micron.com>,
"rosh@debian.org" <rosh@debian.org>,
"quic_nguyenb@quicinc.com" <quic_nguyenb@quicinc.com>,
"linux-scsi@vger.kernel.org" <linux-scsi@vger.kernel.org>,
"adrian.hunter@intel.com" <adrian.hunter@intel.com>,
"avri.altman@sandisk.com" <avri.altman@sandisk.com>,
"nitin.rawat@oss.qualcomm.com" <nitin.rawat@oss.qualcomm.com>,
"mani@kernel.org" <mani@kernel.org>,
"James.Bottomley@HansenPartnership.com"
<James.Bottomley@HansenPartnership.com>
Subject: Re: [PATCH] ufs: core: Fix a deadlock in the frequency scaling code
Date: Fri, 5 Dec 2025 08:32:01 +0000 [thread overview]
Message-ID: <a44b3c71da98d09ce7c4f55e5a5d217329d8be26.camel@mediatek.com> (raw)
In-Reply-To: <20251204181548.1006696-1-bvanassche@acm.org>
On Thu, 2025-12-04 at 08:15 -1000, Bart Van Assche wrote:
> Commit 08b12cda6c44 ("scsi: ufs: core: Switch to
> scsi_get_internal_cmd()")
> accidentally introduced a deadlock in the frequency scaling code.
> ufshcd_clock_scaling_unprepare() may submit a device management
> command
> while SCSI command processing is blocked. The deadlock was introduced
> by
> using the SCSI core for submitting device management commands
> (scsi_get_internal_cmd() + blk_execute_rq()). Fix this deadlock by
> calling
> blk_mq_unquiesce_tagset() before any device management commands are
> submitted by ufshcd_clock_scaling_unprepare().
>
> Fixes: 08b12cda6c44 ("scsi: ufs: core: Switch to
> scsi_get_internal_cmd()")
> Reported-by: Manivannan Sadhasivam <mani@kernel.org>
> Reported-by: Roger Shimizu <rosh@debian.org>
> Closes:
> https://lore.kernel.org/linux-scsi/ehorjaflathzab5oekx2nae2zss5vi2r36yqkqsfjb2fgsifz2@yk3us5g3igow/
> Tested-by: Roger Shimizu <rosh@debian.org>
> Cc: Nitin Rawat <nitin.rawat@oss.qualcomm.com>
> Signed-off-by: Bart Van Assche <bvanassche@acm.org>
> ---
Reviewed-by: Peter Wang <peter.wang@mediatek.com>
next prev parent reply other threads:[~2025-12-05 8:32 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-04 18:15 [PATCH] ufs: core: Fix a deadlock in the frequency scaling code Bart Van Assche
2025-12-05 8:32 ` Peter Wang (王信友) [this message]
2025-12-06 15:07 ` Nitin Rawat
2025-12-07 21:48 ` Alexey Klimov
2025-12-09 2:59 ` Martin K. Petersen
2025-12-09 11:33 ` Manivannan Sadhasivam
2025-12-09 17:51 ` Bart Van Assche
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=a44b3c71da98d09ce7c4f55e5a5d217329d8be26.camel@mediatek.com \
--to=peter.wang@mediatek.com \
--cc=James.Bottomley@HansenPartnership.com \
--cc=adrian.hunter@intel.com \
--cc=avri.altman@sandisk.com \
--cc=beanhuo@micron.com \
--cc=bvanassche@acm.org \
--cc=linux-scsi@vger.kernel.org \
--cc=mani@kernel.org \
--cc=martin.petersen@oracle.com \
--cc=nitin.rawat@oss.qualcomm.com \
--cc=quic_nguyenb@quicinc.com \
--cc=rosh@debian.org \
/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