From: Patrick McHardy <kaber@trash.net>
To: Nick Orlov <bugfixer@list.ru>
Cc: linux-kernel <linux-kernel@vger.kernel.org>,
linux-netdev <linux-netdev@vger.kernel.org>,
Andrew Morton <akpm@osdl.org>
Subject: Re: netdevice name corruption is still present in 2.6.18-rc6-mm1
Date: Sat, 09 Sep 2006 16:19:13 +0200 [thread overview]
Message-ID: <4502CD61.2050601@trash.net> (raw)
In-Reply-To: <20060909032939.GA3087@nickolas.homeunix.com>
[-- 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);
next prev parent reply other threads:[~2006-09-09 14:18 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
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
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=4502CD61.2050601@trash.net \
--to=kaber@trash.net \
--cc=akpm@osdl.org \
--cc=bugfixer@list.ru \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-netdev@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