From: Stanley Jhu <stanleyjhu@google.com>
To: "Martin K . Petersen" <mkp@kernel.org>,
Jens Wiklander <jenswi@kernel.org>,
linux-scsi@vger.kernel.org
Cc: "Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
"Arnd Bergmann" <arnd@arndb.de>,
"Bart Van Assche" <bvanassche@acm.org>,
"Avri Altman" <avri.altman@sandisk.com>,
"Alim Akhtar" <alim.akhtar@samsung.com>,
"Bean Huo" <beanhuo@iokpp.de>, "Bean Huo" <beanhuo@micron.com>,
"Alexey Charkov" <alchark@flipper.net>,
"Can Guo" <can.guo@oss.qualcomm.com>,
"Ulf Hansson" <ulfh@kernel.org>,
"Linus Walleij" <linusw@kernel.org>,
"Shyam Saini" <shyamsaini@linux.microsoft.com>,
"Alex Bennée" <alex.bennee@linaro.org>,
"James E . J . Bottomley" <James.Bottomley@HansenPartnership.com>,
linux-kernel@vger.kernel.org
Subject: [PATCH v6 3/3] scsi: ufs: rpmb: Drop the unregistered ufs_rpmb bus
Date: Thu, 12 Nov 2026 08:41:12 +0800 [thread overview]
Message-ID: <20261112004112.3059801-4-stanleyjhu@google.com> (raw)
In-Reply-To: <20261112004112.3059801-1-stanleyjhu@google.com>
ufs_rpmb_probe() assigns ufs_rpmb_bus_type to dev.bus without ever
calling bus_register(). Since commit 36f35b8df697 ("driver core: reject
devices with unregistered buses"), device_register() rejects
unregistered buses with -EINVAL and UFS RPMB region registration fails.
ufs_rpmb_bus_type defines no callbacks and has no drivers, and
consumers look up regions through /sys/class/rpmb. Drop
ufs_rpmb_bus_type and leave dev.bus unset.
Fixes: b06b8c421485 ("scsi: ufs: core: Add OP-TEE based RPMB driver for UFS devices")
Cc: stable@vger.kernel.org
Reviewed-by: Bean Huo <beanhuo@micron.com>
Signed-off-by: Stanley Jhu <stanleyjhu@google.com>
---
drivers/ufs/core/ufs-rpmb.c | 5 -----
1 file changed, 5 deletions(-)
diff --git a/drivers/ufs/core/ufs-rpmb.c b/drivers/ufs/core/ufs-rpmb.c
index 11d2d8e789d0..6803f3e62d78 100644
--- a/drivers/ufs/core/ufs-rpmb.c
+++ b/drivers/ufs/core/ufs-rpmb.c
@@ -28,10 +28,6 @@
#define UFS_RPMB_SEC_PROTOCOL 0xEC /* JEDEC UFS application */
#define UFS_RPMB_SEC_PROTOCOL_ID 0x01 /* JEDEC UFS RPMB protocol ID, CDB byte3 */
-static const struct bus_type ufs_rpmb_bus_type = {
- .name = "ufs_rpmb",
-};
-
/* UFS RPMB device structure */
struct ufs_rpmb_dev {
u8 region_id;
@@ -206,7 +202,6 @@ int ufs_rpmb_probe(struct ufs_hba *hba)
ufs_rpmb->sdev = sdev;
ufs_rpmb->region_id = region;
ufs_rpmb->dev.parent = &sdev->sdev_gendev;
- ufs_rpmb->dev.bus = &ufs_rpmb_bus_type;
ufs_rpmb->dev.release = ufs_rpmb_device_release;
dev_set_name(&ufs_rpmb->dev, "ufs_rpmb%d", region);
--
2.56.0.567.gdb80ae8cd5-goog
prev parent reply other threads:[~2026-11-12 0:41 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-12 0:41 [PATCH v6 0/3] rpmb: Fix request serialisation and teardown races Stanley Jhu
2026-11-12 0:41 ` [PATCH v6 1/3] rpmb: core: Guard frame requests and teardown with mutex Stanley Jhu
2026-11-12 0:41 ` [PATCH v6 2/3] scsi: ufs: rpmb: Decouple device lifecycle from devres to avoid UAF Stanley Jhu
2026-11-12 0:41 ` Stanley Jhu [this message]
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=20261112004112.3059801-4-stanleyjhu@google.com \
--to=stanleyjhu@google.com \
--cc=James.Bottomley@HansenPartnership.com \
--cc=alchark@flipper.net \
--cc=alex.bennee@linaro.org \
--cc=alim.akhtar@samsung.com \
--cc=arnd@arndb.de \
--cc=avri.altman@sandisk.com \
--cc=beanhuo@iokpp.de \
--cc=beanhuo@micron.com \
--cc=bvanassche@acm.org \
--cc=can.guo@oss.qualcomm.com \
--cc=gregkh@linuxfoundation.org \
--cc=jenswi@kernel.org \
--cc=linusw@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=mkp@kernel.org \
--cc=shyamsaini@linux.microsoft.com \
--cc=ulfh@kernel.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
all inboxes | Powered by JetHome®