From: "Martin K. Petersen" <martin.petersen@oracle.com>
To: Bart Van Assche <bvanassche@acm.org>
Cc: "Martin K . Petersen" <martin.petersen@oracle.com>,
linux-scsi@vger.kernel.org,
"James E.J. Bottomley" <James.Bottomley@HansenPartnership.com>,
Avri Altman <avri.altman@wdc.com>,
Peter Wang <peter.wang@mediatek.com>,
Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>,
Eric Biggers <ebiggers@google.com>,
Minwoo Im <minwoo.im@samsung.com>,
Can Guo <quic_cang@quicinc.com>, Santosh Y <santoshsy@gmail.com>,
"James E.J. Bottomley" <jejb@linux.ibm.com>
Subject: Re: [PATCH v2] scsi: ufs: core: Fix a race condition related to device commands
Date: Thu, 20 Mar 2025 20:48:53 -0400 [thread overview]
Message-ID: <yq1cyeb9pjp.fsf@ca-mkp.ca.oracle.com> (raw)
In-Reply-To: <20250314225206.1487838-1-bvanassche@acm.org> (Bart Van Assche's message of "Fri, 14 Mar 2025 15:51:50 -0700")
Bart,
> There is a TOCTOU race in ufshcd_compl_one_cqe():
> hba->dev_cmd.complete may be cleared from another thread after it has
> been checked and before it is used. Fix this race by moving the device
> command completion from the stack of the device command submitter into
> struct ufs_hba. This patch fixes the following kernel crash:
Applied to 6.15/scsi-staging, thanks!
--
Martin K. Petersen Oracle Linux Engineering
next prev parent reply other threads:[~2025-03-21 0:49 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-14 22:51 [PATCH v2] scsi: ufs: core: Fix a race condition related to device commands Bart Van Assche
2025-03-15 8:46 ` Avri Altman
2025-03-17 22:49 ` Bart Van Assche
2025-03-18 2:39 ` Peter Wang (王信友)
2025-03-21 0:48 ` Martin K. Petersen [this message]
2025-04-07 16:59 ` Bart Van Assche
2025-04-07 18:55 ` Martin K. Petersen
2025-04-07 19:18 ` Bart Van Assche
2025-04-07 19:44 ` 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=yq1cyeb9pjp.fsf@ca-mkp.ca.oracle.com \
--to=martin.petersen@oracle.com \
--cc=James.Bottomley@HansenPartnership.com \
--cc=avri.altman@wdc.com \
--cc=bvanassche@acm.org \
--cc=ebiggers@google.com \
--cc=jejb@linux.ibm.com \
--cc=linux-scsi@vger.kernel.org \
--cc=manivannan.sadhasivam@linaro.org \
--cc=minwoo.im@samsung.com \
--cc=peter.wang@mediatek.com \
--cc=quic_cang@quicinc.com \
--cc=santoshsy@gmail.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