From: netdev-bot+sashiko@kernel.org
To: mat.jonczyk@o2.pl
Cc: andrew@lunn.ch, javen_xu@realsil.com.cn, hkallweit1@gmail.com,
linux@armlinux.org.uk, kuba@kernel.org,
maxime.chevallier@bootlin.com, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org, stable@vger.kernel.org
Subject: Re: [PATCH] net: phy: realtek: fix listing of sysfs directory tree
Date: Mon, 16 Nov 2026 21:43:49 +0000 [thread overview]
Message-ID: <179486542983.3136.9636959145442798025@kernel.org> (raw)
In-Reply-To: <20261115214045.3704-1-mat.jonczyk@o2.pl>
Thank you for your contribution! Sashiko AI review found 1 potential
issue(s) to consider.
Critical: 0 · High: 1 · Medium: 0 · Low: 0
If you believe none of the issues are legitimate, please reply to each
issue of Medium severity or higher and explain why the AI is wrong.
If any of them are legitimate and you plan to respin, please let patchwork
know by including "pw-bot: cr" as a separate line at the end of your reply
(one such reply per series is enough).
- [High] The patch renames one Realtek PHY driver ("Realtek RTL8261C/D
10Gbps PHY" -> "Realtek RTL8261C_RTL8261D 10Gbps PHY" in realtek_drvs,…
--
net: phy: realtek: fix listing of sysfs directory tree
This commit renames the RTL8261C/D PHY driver from "Realtek RTL8261C/D
10Gbps PHY" to "Realtek RTL8261C_RTL8261D 10Gbps PHY". The '/' in the old
name makes reading /sys/module/realtek/drivers fail with EIO. It is tagged
for stable.
> diff --git a/drivers/net/phy/realtek/realtek_main.c b/drivers/net/phy/realtek/realtek_main.c
> index ca2d515b77b36..a39ad18382f25 100644
> --- a/drivers/net/phy/realtek/realtek_main.c
> +++ b/drivers/net/phy/realtek/realtek_main.c
> @@ -3483,7 +3483,7 @@ static struct phy_driver realtek_drvs[] = {
> .write_mmd = genphy_write_mmd_unsupported,
> }, {
> PHY_ID_MATCH_EXACT(RTL_8261C_CG),
> - .name = "Realtek RTL8261C/D 10Gbps PHY",
> + .name = "Realtek RTL8261C_RTL8261D 10Gbps PHY",
[Severity: High]
This fixes one driver, but does it leave the root cause in place?
The symlink name under /sys/module/<mod>/drivers is built from the raw
driver name in make_driver_name():
drivers/base/module.c:make_driver_name() {
driver_name = kasprintf(GFP_KERNEL, "%s:%s", drv->bus->name, drv->name);
...
}
module_add_driver() then creates the link under that name:
ret = sysfs_create_link(mk->drivers_dir, &drv->p->kobj, driver_name);
kernfs accepts the '/'. When the directory is read, verify_dirent_name()
in fs/readdir.c rejects the name and getdents fails for the whole
directory:
if (memchr(name, '/', len))
return -EIO;
The driver kobject itself is not affected, because
kobject_set_name_vargs() already does strreplace(t, '/', '!'). Only the
module drivers symlink name skips that replacement.
At this commit, several other tristate PHY drivers still have '/' in
their names:
drivers/net/phy/smsc.c: "SMSC LAN8710/LAN8720"
drivers/net/phy/qcom/at803x.c: "Qualcomm Atheros AR8031/AR8033"
drivers/net/phy/marvell.c: "Marvell 88E308X/88E609X Family"
drivers/net/phy/davicom.c: "Davicom DM9161B/C"
drivers/net/phy/intel-xway.c: "Intel XWAY PHY11G (PEF 7071/PEF 7072) v1.3"
(plus three more entries in the same file)
drivers/net/phy/microchip_t1s.c: "LAN865X Rev.B0/B1 Internal Phy"
drivers/net/phy/xpowers/acx00.c: "X-Powers AC200/AC300 EPHY"
If any of these is built as a module and loaded, find /sys and
ls /sys/module/<mod>/drivers should still fail with EIO. That is the same
symptom quoted in the commit message.
Could the '/' be replaced in make_driver_name() instead, the same way
kobject_set_name_vargs() does it? That would fix every bus and any future
driver name. It would also avoid renaming the user-visible
/sys/bus/mdio_bus/drivers/ entry for this PHY in a stable backport.
> .probe = rtl8261x_probe,
> .config_init = rtl8261x_config_init,
> .get_features = rtl8261x_get_features,
--
Sashiko AI review · https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261115214045.3704-1-mat.jonczyk%40o2.pl
prev parent reply other threads:[~2026-11-16 21:43 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-15 21:40 Mateusz Jończyk
2026-11-15 23:00 ` Andrew Lunn
2026-11-16 21:43 ` netdev-bot+sashiko [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=179486542983.3136.9636959145442798025@kernel.org \
--to=netdev-bot+sashiko@kernel.org \
--cc=andrew@lunn.ch \
--cc=hkallweit1@gmail.com \
--cc=javen_xu@realsil.com.cn \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=mat.jonczyk@o2.pl \
--cc=maxime.chevallier@bootlin.com \
--cc=netdev@vger.kernel.org \
--cc=stable@vger.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®