Article View: linux.kernel.netdev
Article #17463Re: [PATCH] net: phy: realtek: fix listing of sysfs directory tree
From: netdev-bot+sashiko
Date: Mon, 16 Nov 2026 21:43
Date: Mon, 16 Nov 2026 21:43
89 lines
11236 bytes
11236 bytes
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
Technical Details
Message-ID:
<179486542983.3136.9636959145442798025@kernel.org>Path:
mbox-mo1.pugleaf.net!news-lax.pugleaf.net!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-364741-linux-kernel-netdev=dewy.ruReferences:
<20261115214045.3704-1-mat.jonczyk@o2.pl>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-lax.pugleaf.net!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-364741-linux-kernel-netdev=dewy.ru From: netdev-bot+sashiko@kernel.org Newsgroups: linux.kernel.netdev Subject: Re: [PATCH] net: phy: realtek: fix listing of sysfs directory tree Date: Mon, 16 Nov 2026 21:43:49 +0000 Organization: Usenet Network Message-ID: <179486542983.3136.9636959145442798025@kernel.org> References: <20261115214045.3704-1-mat.jonczyk@o2.pl> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Injection-Info: usenet.network; logging-data="2174773"; mail-complaints-to="abuse@usenet.network" Cancel-Lock: sha1:elBIj/C3c/qXLR9V7DlyvhoC15o= sha256:X9xgAw67Y8xhIJTeU94lAynwzVcgE+uiKxzSPGPqDiQ= sha1:NQ40Bte1vJp34LwmY5xAvXtq7CY= sha256:EIaoSoMU8z2UQlsQO7AQ0wqm+NiIk3vVF+60dQ0Un04= List-ID: <netdev.vger.kernel.org> X-Mailpost-Empty-Hdrs: X-Spam-Level X-Received: from localhost (localhost [127.0.0.1]) by mail.dewy.ru (Postfix) with ESMTP id 8B2FB114D7D; Tue, 17 Nov 2026 00:44:09 +0300 (MSK) X-Virus-Scanned: Debian amavisd-new at usenet.network X-Spam-Flag: NO X-Spam-Score: -3.401 X-Spam-Status: No, score=-3.401 tagged_above=-9999 required=6.31 tests=[DCC_REPUT_70_89=0.1, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, MAILING_LIST_MULTI=-1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001] autolearn=ham autolearn_force=no X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (2048-bit key) header.d=kernel.org X-Received: from mail.dewy.ru ([127.0.0.1]) by localhost (mail.dewy.ru [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id szs5VKf7JJbc; Tue, 17 Nov 2026 00:44:05 +0300 (MSK) X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=104.64.211.4; helo=sin.lore.kernel.org; envelope-from=netdev+bounces-364741-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> X-Authentication-Results: OpenDMARC; dmarc=pass (p=quarantine dis=none) header.from=kernel.org X-Received: from sin.lore.kernel.org (sin.lore.kernel.org [104.64.211.4]) by mail.dewy.ru (Postfix) with ESMTPS id 2C2CE114CF6; Tue, 17 Nov 2026 00:43:56 +0300 (MSK) X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92]) by sin.lore.kernel.org (Postfix) with ESMTP id 34EAB25DFE; Mon, 16 Nov 2026 21:43:53 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1 X-ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass; t=1794865432; b=WV22FLMLV90245ma39CGy7kgdogkePNKfkpHPNgB5WttdaUlJP31X11z21o1YwXY52CE Q5jW2Ftn1SBFWA5BSu6lW354SS8N3MNwZEho2A18psIVJqVvRE8L1MXV08ccB40MXyssr hJgSu9H5xROExXAZI1l64wnwiLQaIzSZ1Sm2erGy5YHKAZtn7+nhvJwUWp/S6WObOHxF/ CYCiPv0sKYPdB+ziFL9565Ay53sBEb0B37hH508u/A0b40siycTGKGgjFyXciBT9Xo/1I LDBtcXlZTnV1wAo3/6BHEbJFMh30X0IPTrPq6P1cwNvRMuoQALazXQYMk/i1Z0+/VBg== X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1794865432; h=X-Original-To:Received:Received:DKIM-Signature:Subject:From:To:Cc: Date:Message-ID:In-Reply-To:References:X-sashiko-severity: Content-Type:Content-Transfer-Encoding:X-Mailing-List:List-Id: List-Post:List-Help:List-Subscribe:List-Unsubscribe:List-Owner: Precedence:MIME-Version; bh=Ov/6IZZ7XEfFuf0xpzSPcbQE6OpbtU5d3AbTS9+wKu4=; b=lSXicV+EzWRppnkD3UCfVmatRjiX/05qe6tfn5hd+vlTSZc3fCjzqXois5fZJEfD8dM6 YEsaCZ5gH4NjrH0CEbj42/gRqatBxNlkw05W/vq0EZxPACeYWhtd1G3P2epwmJdihMnSt U/3pPISm6OBElQhmZT01vlpZ9lNgv6Wok3g42xiEIsypF7mDQynOnkqrhBAIECsCmYPrt mWzrNrkCHrvUcWoyc90PMkWOAkEOyD8vRlwoiFxy7EJ+mB7td4COFbYq5Uz/+XxPfdaBU wU3VNb/E4ubC/Ei9plBboNg1jf0B+kkM60O+GzPueZQyOplhtrbsbLyKLwjqAIP5bPQ== X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=P21+LzkM; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1 X-Received: from localhost.localdomain (localhost [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 2320E606A338; Mon, 16 Nov 2026 21:43:52 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=P21+LzkM X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1794865431; b=GW3SZmKyIMnp8VIXabHU7vkAh0GRNG5JerF1WAqM5w4NzNi6gL2G9e3EiJyvX46QW73g t7Sh+ceWwMCfMKnFVV96LXRuazsgPcDLm2rp0j4s9GNalnzb/oG80TD1a1y+WY2wOLPzD 0XCfzOmFARNg/dyrnqhvxCfOHVhvmB4GqvA00po+pIkXrXRU4Tzw/ruw9zd6wukCCuKrO CuDtPfnFang9s1zZGPynC5NzZ1gwSvMXmZwSsQXdcxwscRHr8y/7+5QGpPvm0YZ75bQbz ePCF3R3siu9uqW2BEl7IXG1noV7vEMBVnGOmXyyvBJJt5Dl2S/lWTayX4i0jb+sdj4g== X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1794865431; h=Received:DKIM-Signature:Subject:From:To:Cc:Date:Message-ID: In-Reply-To:References:X-sashiko-severity:Content-Type: Content-Transfer-Encoding:MIME-Version; bh=Ov/6IZZ7XEfFuf0xpzSPcbQE6OpbtU5d3AbTS9+wKu4=; b=B3Zfvdruq155a0nm3jMliwgt6oAnTcB5YtUkcXVfFnG16UndgbWbTiQ3s2XKROiAUnVx awTJ2JN967I80xNnxWEsHJbsmCSeXp5zqHxPqbXqAncNDsyIYB7DSqTlKEok7J/Jh+RV4 IMPDjzLPpZH5C/hbDE60f483xjVp80Egeo5VECFFO1YM5WPT3g0ayL5HrHBSi5bC6CxXb 0Tss58qBaDgDnOSxCQS8/pRcTmluc10nFSuVNApdOduI0po19MI/1TxjCLpdNQWY96Abv RacwcTfZhs9HLXfiZPD8O9yx3CbSM5/2XQMBReouZyUO7kzmICSsA9X1ZXk1C9xMN/A== X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=P21+LzkM; arc=none smtp.remote-ip=100.103.45.18 X-Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4161E606A31C; Mon, 16 Nov 2026 21:43:51 +0000 (UTC) X-Received: by smtp.kernel.org (Postfix) with ESMTPSA id 529FB1F000C4; Mon, 16 Nov 2026 21:43:50 +0000 (UTC) X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1794865430; bh=Ov/6IZZ7XEfFuf0xpzSPcbQE6OpbtU5d3AbTS9+wKu4=; h=Subject:From:To:Cc:Date:In-Reply-To:References; b=P21+LzkMrBCQNVvG4YGW5FId3BH0twyb3DifSatU6Hs0gg49292bIV9yPZjFffBjb av0ZgTewreqAz5TIw9NeAUQap7pAdMbOrCCQ9NLHI75gtXsEMaa2mPF0QT+mzfPFVg A5Dz/hC1VTTcFXuuLOoqQTHBr1NPoQjOGeGKCeGDymC98QrfzQazUqObB8fiR0i1Mn 2nC9WPdJJPXj1WuJBFQDSHLaxV64VmuOamuUGiIvuohhrpwDSOGxvoTZgIf+aAoqdJ kE+NKaLg7Usf/mdL3yCjwNvco12/n5Vg4wKVcFpYOrYCe5hK0Xea0eTAuRRAwuBKoU 9feXjCAwbS8Og== X-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 X-In-Reply-To: <20261115214045.3704-1-mat.jonczyk@o2.pl> X-sashiko-severity: High X-Mailing-List: netdev@vger.kernel.org X-List-Post: <mailto:netdev@vger.kernel.org> X-List-Help: <mailto:netdev+help@vger.kernel.org> X-List-Subscribe: <mailto:netdev+subscribe@vger.kernel.org> X-List-Unsubscribe: <mailto:netdev+unsubscribe@vger.kernel.org> X-List-Owner: <mailto:netdev+owner@vger.kernel.org> X-Precedence: list