* Re: netdevice name corruption is still present in 2.6.18-rc6-mm1
2006-09-09 3:29 netdevice name corruption is still present in 2.6.18-rc6-mm1 Nick Orlov
@ 2006-09-09 5:26 ` Andrew Morton
2006-09-09 14:19 ` Patrick McHardy
2006-09-10 2:07 ` Nick Orlov
2 siblings, 0 replies; 7+ messages in thread
From: Andrew Morton @ 2006-09-09 5:26 UTC (permalink / raw)
To: Nick Orlov; +Cc: linux-kernel, linux-netdev, David S. Miller
On Fri, 08 Sep 2006 23:29:39 -0400
Nick Orlov <bugfixer@list.ru> wrote:
> Andrew,
>
> I would like to confirm that issue with netdevice name corruption
> is still present in 2.6.18-rc6-mm1 and extremely easy to reproduce
> (at least on my system) with 100% hit rate.
>
> All I have to do is 'sudo /etc/init.d/networking stop'. And here we go:
>
> Sep 8 22:50:11 nickolas kernel: [events/1:7]: Changing netdevice name from [ath0] to [\200^C^Bб\206]
>
> Does not look like an userspace issue at all...
>
> Last kernel which is known to be working (for me) is 2.6.18-rc1-mm2.
> Sorry, I now that a lot of things had changed since then,
> but I was somewhat busy last couple of months...
>
> Please let me know if I can help somehow to debug it.
>
> Thank you,
> Nick Orlov.
>
> P.S. I admit that I'm using "binary only atheros driver" which makes
> this report a lot less legit. But seems like people experiencing the
> very same issue w/o any closed-source drivers loaded...
>
> P.P.S I don't even have NetworkManager executable on my system
> (Debian unstable updated on daily basis), so NetworkManager have
> nothing to do with it.
>
No idea what's happened here then. That was with Dave's patch applied:
From: David Miller <davem@davemloft.net>
A debugging patch like this one should help figure out the culprit.
If we don't see the gibberish netdevice name printed in the kernel
logs, then likely something is corrupting the netdevice structure or
the memory holding the name.
Signed-off-by: Andrew Morton <akpm@osdl.org>
---
net/core/dev.c | 5 +++++
1 file changed, 5 insertions(+)
diff -puN net/core/dev.c~dev_change_name-debug net/core/dev.c
--- a/net/core/dev.c~dev_change_name-debug
+++ a/net/core/dev.c
@@ -738,6 +738,11 @@ int dev_change_name(struct net_device *d
if (!dev_valid_name(newname))
return -EINVAL;
+#if 1
+ printk("[%s:%d]: Changing netdevice name from [%s] to [%s]\n",
+ current->comm, current->pid,
+ dev->name, newname);
+#endif
if (strchr(newname, '%')) {
err = dev_alloc_name(dev, newname);
_
^ permalink raw reply [flat|nested] 7+ messages in thread* Re: netdevice name corruption is still present in 2.6.18-rc6-mm1
2006-09-09 3:29 netdevice name corruption is still present in 2.6.18-rc6-mm1 Nick Orlov
2006-09-09 5:26 ` Andrew Morton
@ 2006-09-09 14:19 ` Patrick McHardy
2006-09-10 2:07 ` Nick Orlov
2 siblings, 0 replies; 7+ messages in thread
From: Patrick McHardy @ 2006-09-09 14:19 UTC (permalink / raw)
To: Nick Orlov; +Cc: linux-kernel, linux-netdev, Andrew Morton
[-- Attachment #1: Type: text/plain, Size: 420 bytes --]
Nick Orlov wrote:
> I would like to confirm that issue with netdevice name corruption
> is still present in 2.6.18-rc6-mm1 and extremely easy to reproduce
> (at least on my system) with 100% hit rate.
>
> All I have to do is 'sudo /etc/init.d/networking stop'. And here we go:
>
> Sep 8 22:50:11 nickolas kernel: [events/1:7]: Changing netdevice name from [ath0] to [\200^C^Bб\206]
Can you test this patch please?
[-- Attachment #2: x --]
[-- Type: text/plain, Size: 984 bytes --]
[RTNETLINK]: Fix netdevice name corruption
When changing a device by ifindex without including a IFLA_IFNAME
attribute, the ifname variable contains random garbage and is used
to change the device name.
Signed-off-by: Patrick McHardy <kaber@trash.net>
---
commit bc3417f679c035e4296cd34f6a55d6b9215764fc
tree e43f52402d79560cbed73a769f4def3e761e7a03
parent 6ddbd02eb61532f9af4f28912a09717ab8c71d8a
author Patrick McHardy <kaber@trash.net> Sat, 09 Sep 2006 16:18:12 +0200
committer Patrick McHardy <kaber@trash.net> Sat, 09 Sep 2006 16:18:12 +0200
net/core/rtnetlink.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/net/core/rtnetlink.c b/net/core/rtnetlink.c
index 63b882a..d8e25e0 100644
--- a/net/core/rtnetlink.c
+++ b/net/core/rtnetlink.c
@@ -394,6 +394,8 @@ static int rtnl_setlink(struct sk_buff *
if (tb[IFLA_IFNAME])
nla_strlcpy(ifname, tb[IFLA_IFNAME], IFNAMSIZ);
+ else
+ ifname[0] = '\0';
err = -EINVAL;
ifm = nlmsg_data(nlh);
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: netdevice name corruption is still present in 2.6.18-rc6-mm1
2006-09-09 3:29 netdevice name corruption is still present in 2.6.18-rc6-mm1 Nick Orlov
2006-09-09 5:26 ` Andrew Morton
2006-09-09 14:19 ` Patrick McHardy
@ 2006-09-10 2:07 ` Nick Orlov
2006-09-10 2:11 ` Nick Orlov
2006-09-10 9:40 ` Patrick McHardy
2 siblings, 2 replies; 7+ messages in thread
From: Nick Orlov @ 2006-09-10 2:07 UTC (permalink / raw)
To: linux-kernel; +Cc: Andrew Morton, Patrick McHardy
On Fri, Sep 08, 2006 at 11:29:39PM -0400, Nick Orlov wrote:
> Andrew,
>
> I would like to confirm that issue with netdevice name corruption
> is still present in 2.6.18-rc6-mm1 and extremely easy to reproduce
> (at least on my system) with 100% hit rate.
>
> All I have to do is 'sudo /etc/init.d/networking stop'. And here we go:
>
> Sep 8 22:50:11 nickolas kernel: [events/1:7]: Changing netdevice name from [ath0] to [\200^C^Bб\206]
>
Confirmed: Patrick's patch fixes the issue for me.
(http://marc.theaimsgroup.com/?l=linux-kernel&m=115777959918268&w=2)
Thank you,
Nick Orlov.
P.S. I'm not subscribed to the list so I had to reply to my own mail in
a hope that it will make it to the right thread.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: netdevice name corruption is still present in 2.6.18-rc6-mm1
2006-09-10 2:07 ` Nick Orlov
@ 2006-09-10 2:11 ` Nick Orlov
2006-09-10 9:40 ` Patrick McHardy
1 sibling, 0 replies; 7+ messages in thread
From: Nick Orlov @ 2006-09-10 2:11 UTC (permalink / raw)
To: linux-kernel; +Cc: Andrew Morton, Patrick McHardy
On Sat, Sep 09, 2006 at 10:07:07PM -0400, Nick Orlov wrote:
> On Fri, Sep 08, 2006 at 11:29:39PM -0400, Nick Orlov wrote:
> > Andrew,
> >
> > I would like to confirm that issue with netdevice name corruption
> > is still present in 2.6.18-rc6-mm1 and extremely easy to reproduce
> > (at least on my system) with 100% hit rate.
> >
> > All I have to do is 'sudo /etc/init.d/networking stop'. And here we go:
> >
> > Sep 8 22:50:11 nickolas kernel: [events/1:7]: Changing netdevice name from [ath0] to [\200^C^Bб\206]
> >
>
> Confirmed: Patrick's patch fixes the issue for me.
> (http://marc.theaimsgroup.com/?l=linux-kernel&m=115777959918268&w=2)
Sorry, wrong link.
http://marc.theaimsgroup.com/?l=linux-kernel&m=115781171031918&w=2
--
With best wishes,
Nick Orlov.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: netdevice name corruption is still present in 2.6.18-rc6-mm1
2006-09-10 2:07 ` Nick Orlov
2006-09-10 2:11 ` Nick Orlov
@ 2006-09-10 9:40 ` Patrick McHardy
2006-09-14 3:36 ` David Miller
1 sibling, 1 reply; 7+ messages in thread
From: Patrick McHardy @ 2006-09-10 9:40 UTC (permalink / raw)
To: David S. Miller
Cc: Nick Orlov, linux-kernel, Andrew Morton, Linux Netdev List
[-- Attachment #1: Type: text/plain, Size: 721 bytes --]
Nick Orlov wrote:
> On Fri, Sep 08, 2006 at 11:29:39PM -0400, Nick Orlov wrote:
>
>>I would like to confirm that issue with netdevice name corruption
>>is still present in 2.6.18-rc6-mm1 and extremely easy to reproduce
>>(at least on my system) with 100% hit rate.
>>
>>All I have to do is 'sudo /etc/init.d/networking stop'. And here we go:
>>
>>Sep 8 22:50:11 nickolas kernel: [events/1:7]: Changing netdevice name from [ath0] to [\200^C^Bб\206]
>>
>
>
> Confirmed: Patrick's patch fixes the issue for me.
> (http://marc.theaimsgroup.com/?l=linux-kernel&m=115777959918268&w=2)
Thanks Nick. Dave, please apply the attached patch to net-2.6.19, it
fixes the netdevice name corruption reported by multiple people.
[-- Attachment #2: x --]
[-- Type: text/plain, Size: 984 bytes --]
[RTNETLINK]: Fix netdevice name corruption
When changing a device by ifindex without including a IFLA_IFNAME
attribute, the ifname variable contains random garbage and is used
to change the device name.
Signed-off-by: Patrick McHardy <kaber@trash.net>
---
commit bc3417f679c035e4296cd34f6a55d6b9215764fc
tree e43f52402d79560cbed73a769f4def3e761e7a03
parent 6ddbd02eb61532f9af4f28912a09717ab8c71d8a
author Patrick McHardy <kaber@trash.net> Sat, 09 Sep 2006 16:18:12 +0200
committer Patrick McHardy <kaber@trash.net> Sat, 09 Sep 2006 16:18:12 +0200
net/core/rtnetlink.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/net/core/rtnetlink.c b/net/core/rtnetlink.c
index 63b882a..d8e25e0 100644
--- a/net/core/rtnetlink.c
+++ b/net/core/rtnetlink.c
@@ -394,6 +394,8 @@ static int rtnl_setlink(struct sk_buff *
if (tb[IFLA_IFNAME])
nla_strlcpy(ifname, tb[IFLA_IFNAME], IFNAMSIZ);
+ else
+ ifname[0] = '\0';
err = -EINVAL;
ifm = nlmsg_data(nlh);
^ permalink raw reply related [flat|nested] 7+ messages in thread