From: Naomi Chu <naomi.chu@mediatek.com>
To: <sashiko-reviews@lists.linux.dev>
Cc: <linux-scsi@vger.kernel.org>, <mkp@kernel.org>,
<avri.altman@sandisk.com>, <alim.akhtar@samsung.com>,
<James.Bottomley@HansenPartnership.com>, <bvanassche@acm.org>
Subject: Re: [PATCH v1] scsi: ufs: core: Hold a clock reference across the probe
Date: Wed, 16 Sep 2026 15:20:55 +0800 [thread overview]
Message-ID: <20260916072055.1346914-1-naomi.chu@mediatek.com> (raw)
In-Reply-To: <20260909092536.B78571F00A3D@smtp.kernel.org>
On Wed, Sep 09, 2026 at 09:25:36AM +0000, sashiko-bot@kernel.org wrote:
> Pre-existing issues:
> - [Critical] Missing scsi_remove_host() on the ufshcd_init() error path
> leaves dangling sysfs references leading to use-after-free.
[...]
> If ufshcd_init() fails after successfully calling ufshcd_add_scsi_host()
> (for example, if ufshcd_link_startup() or ufshcd_verify_dev_init() fails
> and jumps to out_release), the function returns an error without calling
> scsi_remove_host().
Thanks for the report. As the bot itself notes, this is a pre-existing
issue, and this patch neither introduces nor changes it.
The new out_release label only drops the clock reference taken earlier in
ufshcd_init() and then falls through to out_disable. Every goto that this
patch retargets used to jump to out_disable directly, so the set of
failures that leaves ufshcd_init() without calling scsi_remove_host() is
exactly the same before and after this patch.
Fixing that error path is independent of the clock reference problem
addressed here, so it should be fixed by a completely separate patch
rather than folded into this one.
Thanks,
Naomi
next prev parent reply other threads:[~2026-09-16 7:21 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-09 9:10 [PATCH v1] scsi: ufs: core: Hold a clock reference across the probe Naomi Chu
2026-09-09 9:25 ` sashiko-bot
2026-09-16 7:20 ` Naomi Chu [this message]
2026-09-21 13:21 ` Peter Wang
2026-10-01 8:41 ` Stanley Jhu
2026-10-06 2:43 ` Martin K. Petersen (Oracle)
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=20260916072055.1346914-1-naomi.chu@mediatek.com \
--to=naomi.chu@mediatek.com \
--cc=James.Bottomley@HansenPartnership.com \
--cc=alim.akhtar@samsung.com \
--cc=avri.altman@sandisk.com \
--cc=bvanassche@acm.org \
--cc=linux-scsi@vger.kernel.org \
--cc=mkp@kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.