Bug 12743 - Oops when renaming interfaces added to a bridge
Summary: Oops when renaming interfaces added to a bridge
Status: CLOSED CODE_FIX
Alias: None
Product: Networking
Classification: Unclassified
Component: Other (show other bugs)
Hardware: All Linux
: P1 normal
Assignee: Arnaldo Carvalho de Melo
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-02-20 04:01 UTC by Enrico Scholz
Modified: 2012-05-30 14:10 UTC (History)
2 users (show)

See Also:
Kernel Version: 2.6.27.18
Subsystem:
Regression: No
Bisected commit-id:


Attachments
session log (inclusive stracktrace) (2.62 KB, text/plain)
2009-02-20 04:03 UTC, Enrico Scholz
Details

Description Enrico Scholz 2009-02-20 04:01:27 UTC
Distribution: custom 
Hardware Environment: ARM PXA320
[reproduced on Fedora 10 with 2.6.27.15-170.2.24.fc10.x86_64 too]

Problem Description:

When renaming an interface which was added to a bridge, its name won't
be changed in the bridge setup.  Adding another interface which was
created later with the original name,  kernel oopses

A 'find /sys -name dummy*' between step 4 and 5 reports

/sys/devices/virtual/net/br0/brif/dummy0
/sys/devices/virtual/net/dummy100
/sys/bus/i2c/drivers/dummy
/sys/class/net/dummy100


Although it is only a WARNING, system goes havoc because whole
networking stack seems to be unusable then.



Steps to reproduce:

1. brctl addbr br0

2. modprobe -o d0 dummy
3. brctl addif br0 dummy0

4. ifrename -i dummy0 -n dummy100

5. modprobe -o d1 dummy
6. brctl addif br0 dummy0


device dummy0 entered promiscuous mode
------------[ cut here ]------------
WARNING: at fs/sysfs/dir.c:463 sysfs_add_one+0x34/0x48()
....
Comment 1 Enrico Scholz 2009-02-20 04:03:37 UTC
Created attachment 20317 [details]
session log (inclusive stracktrace)
Comment 2 Anonymous Emailer 2009-02-20 09:45:31 UTC
Reply-To: akpm@linux-foundation.org


(switched to email.  Please respond via emailed reply-to-all, not via the
bugzilla web interface).

On Fri, 20 Feb 2009 04:01:27 -0800 (PST) bugme-daemon@bugzilla.kernel.org wrote:

> http://bugzilla.kernel.org/show_bug.cgi?id=12743
> 
>            Summary: Oops when renaming interfaces added to a bridge
>            Product: Networking
>            Version: 2.5
>      KernelVersion: 2.6.27.18
>           Platform: All
>         OS/Version: Linux
>               Tree: Mainline
>             Status: NEW
>           Severity: normal
>           Priority: P1
>          Component: Other
>         AssignedTo: acme@ghostprotocols.net
>         ReportedBy: enrico.scholz@informatik.tu-chemnitz.de
> 
> 
> Distribution: custom 
> Hardware Environment: ARM PXA320
> [reproduced on Fedora 10 with 2.6.27.15-170.2.24.fc10.x86_64 too]
> 
> Problem Description:
> 
> When renaming an interface which was added to a bridge, its name won't
> be changed in the bridge setup.  Adding another interface which was
> created later with the original name,  kernel oopses
> 
> A 'find /sys -name dummy*' between step 4 and 5 reports
> 
> /sys/devices/virtual/net/br0/brif/dummy0
> /sys/devices/virtual/net/dummy100
> /sys/bus/i2c/drivers/dummy
> /sys/class/net/dummy100
> 
> 
> Although it is only a WARNING, system goes havoc because whole
> networking stack seems to be unusable then.
> 
> 
> 
> Steps to reproduce:
> 
> 1. brctl addbr br0
> 
> 2. modprobe -o d0 dummy
> 3. brctl addif br0 dummy0
> 
> 4. ifrename -i dummy0 -n dummy100
> 
> 5. modprobe -o d1 dummy
> 6. brctl addif br0 dummy0
> 
> 
> device dummy0 entered promiscuous mode
> ------------[ cut here ]------------
> WARNING: at fs/sysfs/dir.c:463 sysfs_add_one+0x34/0x48()
> ....
> 
> 
Comment 3 Herbert Xu 2009-02-21 05:06:58 UTC
Andrew Morton <akpm@linux-foundation.org> wrote:
>
>> When renaming an interface which was added to a bridge, its name won't
>> be changed in the bridge setup.  Adding another interface which was
>> created later with the original name,  kernel oopses

Looks like we screwed up when designing the sysfs interface.
The port name really shouldn't show up at all as a file name.

Now we'll have to either add a nasty hack to locate all these
sysfs objects and rename them, or figure out a way to phase this
out.

I really hate sysfs!

Cheers,
Comment 4 Diego Woitasen 2012-01-31 06:52:06 UTC
I've tried to reproduce this bug in the 3.2.0 version and looks fixed.

I couldn't reproduce the same steps because -o options was removed from modprobe. My steps were:

1- modprobe dummy numdummies=10
2- brctl addif br0 dummy0
3- ifrename -i dummy0 -n dummy100
4- ifrename -i dummy1 -n dummy0
5- brctl addif br0 dummy0
6-

# find -name dummy*
./net/br0/brif/dummy100
./net/br0/brif/dummy0
./net/dummy100

I think this report can be closed.

Regards,
 Diego

Note You need to log in before you can comment on or make changes to this bug.