netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: netdevice name corruption is still present in 2.6.18-rc6-mm1
       [not found] ` <20060910020707.GA3160@nickolas.homeunix.com>
@ 2006-09-10  9:40   ` Patrick McHardy
  2006-09-14  3:36     ` David Miller
  0 siblings, 1 reply; 2+ 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] 2+ messages in thread

* Re: netdevice name corruption is still present in 2.6.18-rc6-mm1
  2006-09-10  9:40   ` netdevice name corruption is still present in 2.6.18-rc6-mm1 Patrick McHardy
@ 2006-09-14  3:36     ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2006-09-14  3:36 UTC (permalink / raw)
  To: kaber; +Cc: bugfixer, linux-kernel, akpm, netdev

From: Patrick McHardy <kaber@trash.net>
Date: Sun, 10 Sep 2006 11:40:11 +0200

> Dave, please apply the attached patch to net-2.6.19, it fixes the
> netdevice name corruption reported by multiple people.

Applied, thanks a lot.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2006-09-14  3:36 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20060909032939.GA3087@nickolas.homeunix.com>
     [not found] ` <20060910020707.GA3160@nickolas.homeunix.com>
2006-09-10  9:40   ` netdevice name corruption is still present in 2.6.18-rc6-mm1 Patrick McHardy
2006-09-14  3:36     ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).