* [STABLE][3.0][3.2][Add PATCH] phy/fixed: use an unique MDIO bus name
@ 2012-10-05 12:59 Steven Rostedt
2012-10-07 15:33 ` Ben Hutchings
0 siblings, 1 reply; 5+ messages in thread
From: Steven Rostedt @ 2012-10-05 12:59 UTC (permalink / raw)
To: LKML, stable
Cc: Greg Kroah-Hartman, Ben Hutchings, Florian Fainelli,
David S. Miller
I started testing my 3.2-rt branch on a powerpc box and it would
constantly spit out the following warning causing ktest to think the
boot failed:
sysfs: cannot create duplicate filename '/class/mdio_bus/0
------------[ cut here ]------------
WARNING: at /work/autotest/nobackup/powerpc-test.git/fs/sysfs/dir.c:481
Modules linked in:
NIP: c0000000001de1d4 LR: c0000000001de1d0 CTR: c00000000034a204
REGS: c00000003e81f6b0 TRAP: 0700 Not tainted (3.2.0-test-05692-g1c81065)
MSR: 9000000000029032 <SF,HV,EE,ME,IR,DR,RI> CR: 28000044 XER: 20000000
TASK = c00000003e80d470[1] 'swapper/0' THREAD: c00000003e81c000 CPU: 0
GPR00: c0000000001de1d0 c00000003e81f930 c0000000011d5618 0000000000000042
GPR04: 0000000000000000 ffffffffffffffff c000000001186f38 ffffffffffffffff
GPR08: c0000000012150f8 c000000000a80300 000000000eb59c60 0000000000a80000
GPR12: 0000000024000082 c00000000fff0000 000000003ffffad8 ffffffffffffffff
GPR16: 0000000000000000 0000000000a11c18 0000000000a11cd8 0000000000000060
GPR20: 00000000008ef7be 000000003ffffaf0 0000000000000417 0000000000000000
GPR24: 0000000000000000 0000000000000001 c00000003efe0400 c00000003e81fa40
GPR28: ffffffffffffffef c00000003c20eff8 c0000000011105b8 c00000003e81f930
NIP [c0000000001de1d4] .sysfs_add_one+0x9c/0xb8
LR [c0000000001de1d0] .sysfs_add_one+0x98/0xb8
Call Trace:
[c00000003e81f930] [c0000000001de1d0] .sysfs_add_one+0x98/0xb8 (unreliable)
[c00000003e81f9d0] [c0000000001dec74] .sysfs_do_create_link+0x144/0x210
[c00000003e81faa0] [c0000000001ded78] .sysfs_create_link+0x38/0x40
[c00000003e81fb40] [c000000000379bd8] .device_add+0x278/0x5ec
[c00000003e81fc20] [c000000000379f78] .device_register+0x2c/0x34
[c00000003e81fcb0] [c00000000041af14] .mdiobus_register+0xb4/0x1cc
[c00000003e81fd60] [c000000000a00bc4] .fixed_mdio_bus_init+0xd8/0x114
[c00000003e81fe30] [c00000000000a474] .do_one_initcall+0xc8/0x198
[c00000003e81fee0] [c0000000009d0ae0] .kernel_init+0x12c/0x1b8
[c00000003e81ff90] [c00000000001d624] .kernel_thread+0x54/0x70
The warning is triggered by:
int sysfs_add_one(struct sysfs_addrm_cxt *acxt, struct sysfs_dirent *sd)
{
int ret;
ret = __sysfs_add_one(acxt, sd);
if (ret == -EEXIST) {
char *path = kzalloc(PATH_MAX, GFP_KERNEL);
WARN(1, KERN_WARNING
"sysfs: cannot create duplicate filename '%s'\n",
(path == NULL) ? sd->s_name :
strcat(strcat(sysfs_pathname(acxt->parent_sd, path), "/"),
sd->s_name));
kfree(path);
}
return ret;
}
Doing some investigations, I found it only triggered on some configs,
and it was fixed by 3.3. I ran a ktest.pl reverse bisect (bad is good
and good is bad) and it ended on this commit:
commit 9e6c643bb4502c50b6511206601b7760c610dfcc
Author: Florian Fainelli <florian@openwrt.org>
Date: Mon Jan 9 23:59:25 2012 +0000
phy/fixed: use an unique MDIO bus name.
Signed-off-by: Florian Fainelli <florian@openwrt.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
diff --git a/drivers/net/phy/fixed.c b/drivers/net/phy/fixed.c
index 1fa4d73..633680d 100644
--- a/drivers/net/phy/fixed.c
+++ b/drivers/net/phy/fixed.c
@@ -220,7 +220,7 @@ static int __init fixed_mdio_bus_init(void)
goto err_mdiobus_reg;
}
- snprintf(fmb->mii_bus->id, MII_BUS_ID_SIZE, "0");
+ snprintf(fmb->mii_bus->id, MII_BUS_ID_SIZE, "fixed-0");
fmb->mii_bus->name = "Fixed MDIO Bus";
fmb->mii_bus->priv = fmb;
fmb->mii_bus->parent = &pdev->dev;
Sure enough, adding this patch to both 3.2 and 3.0 fixed the bug.
Please pull this patch into the 3.2 and 3.0 stable trees.
Thanks!
-- Steve
^ permalink raw reply related [flat|nested] 5+ messages in thread* Re: [STABLE][3.0][3.2][Add PATCH] phy/fixed: use an unique MDIO bus name
2012-10-05 12:59 [STABLE][3.0][3.2][Add PATCH] phy/fixed: use an unique MDIO bus name Steven Rostedt
@ 2012-10-07 15:33 ` Ben Hutchings
2012-10-07 18:56 ` David Miller
0 siblings, 1 reply; 5+ messages in thread
From: Ben Hutchings @ 2012-10-07 15:33 UTC (permalink / raw)
To: Steven Rostedt
Cc: LKML, stable, Greg Kroah-Hartman, Florian Fainelli,
David S. Miller, netdev
[-- Attachment #1: Type: text/plain, Size: 1929 bytes --]
On Fri, 2012-10-05 at 08:59 -0400, Steven Rostedt wrote:
> I started testing my 3.2-rt branch on a powerpc box and it would
> constantly spit out the following warning causing ktest to think the
> boot failed:
>
> sysfs: cannot create duplicate filename '/class/mdio_bus/0
[...]
> Doing some investigations, I found it only triggered on some configs,
> and it was fixed by 3.3. I ran a ktest.pl reverse bisect (bad is good
> and good is bad) and it ended on this commit:
>
> commit 9e6c643bb4502c50b6511206601b7760c610dfcc
> Author: Florian Fainelli <florian@openwrt.org>
> Date: Mon Jan 9 23:59:25 2012 +0000
>
> phy/fixed: use an unique MDIO bus name.
>
> Signed-off-by: Florian Fainelli <florian@openwrt.org>
> Signed-off-by: David S. Miller <davem@davemloft.net>
>
> diff --git a/drivers/net/phy/fixed.c b/drivers/net/phy/fixed.c
> index 1fa4d73..633680d 100644
> --- a/drivers/net/phy/fixed.c
> +++ b/drivers/net/phy/fixed.c
> @@ -220,7 +220,7 @@ static int __init fixed_mdio_bus_init(void)
> goto err_mdiobus_reg;
> }
>
> - snprintf(fmb->mii_bus->id, MII_BUS_ID_SIZE, "0");
> + snprintf(fmb->mii_bus->id, MII_BUS_ID_SIZE, "fixed-0");
> fmb->mii_bus->name = "Fixed MDIO Bus";
> fmb->mii_bus->priv = fmb;
> fmb->mii_bus->parent = &pdev->dev;
>
> Sure enough, adding this patch to both 3.2 and 3.0 fixed the bug.
>
> Please pull this patch into the 3.2 and 3.0 stable trees.
Networking stable fixes are normally vetted, backported and bundled up
by David, so I'll let him decide on this.
There are a lot more MDIO bus drivers that don't play nicely with
others, most of which seem to be fixed in mainline. If David agrees
that these are generally worthwhile then perhaps someone could try to
gather those up?
Ben.
--
Ben Hutchings
You can't have everything. Where would you put it?
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 828 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [STABLE][3.0][3.2][Add PATCH] phy/fixed: use an unique MDIO bus name
2012-10-07 15:33 ` Ben Hutchings
@ 2012-10-07 18:56 ` David Miller
2012-10-08 12:39 ` Steven Rostedt
0 siblings, 1 reply; 5+ messages in thread
From: David Miller @ 2012-10-07 18:56 UTC (permalink / raw)
To: ben; +Cc: rostedt, linux-kernel, stable, gregkh, florian, netdev
From: Ben Hutchings <ben@decadent.org.uk>
Date: Sun, 07 Oct 2012 16:33:39 +0100
> Networking stable fixes are normally vetted, backported and bundled up
> by David, so I'll let him decide on this.
>
> There are a lot more MDIO bus drivers that don't play nicely with
> others, most of which seem to be fixed in mainline. If David agrees
> that these are generally worthwhile then perhaps someone could try to
> gather those up?
I very much am not inclined to backport this stuff, it impacts
an extremely small group of people so the risk/benefit ratio is
simply not worth it for me to do the work.
If someone else does the work and tests it, I'm willing to ACK
it going into -stable.
But this change impacted a lot of MDIO drivers and there were
regressions that needed to be fixed up the first time this stuff
went in.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [STABLE][3.0][3.2][Add PATCH] phy/fixed: use an unique MDIO bus name
2012-10-07 18:56 ` David Miller
@ 2012-10-08 12:39 ` Steven Rostedt
2012-10-08 12:52 ` Florian Fainelli
0 siblings, 1 reply; 5+ messages in thread
From: Steven Rostedt @ 2012-10-08 12:39 UTC (permalink / raw)
To: David Miller; +Cc: ben, linux-kernel, stable, gregkh, florian, netdev
On Sun, 2012-10-07 at 14:56 -0400, David Miller wrote:
> But this change impacted a lot of MDIO drivers and there were
> regressions that needed to be fixed up the first time this stuff
> went in.
If it's that big of a deal then we can forget about this fix. I can get
around it if I tweak my config. Probably just skip the MDIO stuff.
-- Steve
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [STABLE][3.0][3.2][Add PATCH] phy/fixed: use an unique MDIO bus name
2012-10-08 12:39 ` Steven Rostedt
@ 2012-10-08 12:52 ` Florian Fainelli
0 siblings, 0 replies; 5+ messages in thread
From: Florian Fainelli @ 2012-10-08 12:52 UTC (permalink / raw)
To: Steven Rostedt; +Cc: David Miller, ben, linux-kernel, stable, gregkh, netdev
On Monday 08 October 2012 08:39:14 Steven Rostedt wrote:
> On Sun, 2012-10-07 at 14:56 -0400, David Miller wrote:
>
> > But this change impacted a lot of MDIO drivers and there were
> > regressions that needed to be fixed up the first time this stuff
> > went in.
>
> If it's that big of a deal then we can forget about this fix. I can get
> around it if I tweak my config. Probably just skip the MDIO stuff.
Yes, I think you can just drop the change considering the number of depending
commits.
--
Florian
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2012-10-08 12:53 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-10-05 12:59 [STABLE][3.0][3.2][Add PATCH] phy/fixed: use an unique MDIO bus name Steven Rostedt
2012-10-07 15:33 ` Ben Hutchings
2012-10-07 18:56 ` David Miller
2012-10-08 12:39 ` Steven Rostedt
2012-10-08 12:52 ` Florian Fainelli
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox