kernel BUG at fs/sysfs/symlink.c:87
Subsystems (2)
Hi,
while using the bridging code between a tap0 and a real eth1 i got this:
Linux zmgr1.wstk.mediaways.net 2.6.10-zmgr-p3cel #1 Mon Jan 24 16:15:39 CET 2005 i686 GNU/Linux
UP, P3 Celeron, Non-Preempt, Vanilla Kernel
kernel BUG at fs/sysfs/symlink.c:87!
invalid operand: 0000 [#1]
Modules linked in: ppp_deflate bsd_comp ppp_async crc_ccitt ppp_generic slhc 3c59x bridge tun autofs eepro100 e100 mii i2c_i801 i2c_core uhci_hcd usbcore CPU: 0 EIP: 0060:[<c017cac6>] Not tainted VLI EFLAGS: 00010246 (2.6.10-zmgr-p3cel)
EIP is at sysfs_create_link+0x56/0x60
eax: c45ef738 ebx: 00000000 ecx: c709f000 edx: c39b3ec0
esi: c8880878 edi: c7915728 ebp: c79156a0 esp: c4d91e94
ds: 007b es: 007b ss: 0068
Process brctl (pid: 3500, threadinfo=c4d90000 task=c52b25e0)
Stack: c017b8cf c68ba7e4 c8880824 00000000 c887aa57 c45ef738 c7915728 c709f000
c45ef220 c709f000 c79156a0 c45ef220 00000000 c887762d c79156a0 c79156a0
c709f090 00000001 c709f000 c45ef220 ffffffed c4d91f34 c8877c34 c45ef220
Call Trace:
[<c017b8cf>] sysfs_create_file+0x2f/0x50
[<c887aa57>] br_sysfs_addif+0xe7/0x140 [bridge]
[<c887762d>] br_add_if+0xbd/0x160 [bridge]
[<c8877c34>] add_del_if+0x64/0x80 [bridge]
[<c022d564>] dev_ifsioc+0x384/0x3f0
[<c022d7b7>] dev_ioctl+0x1e7/0x260
[<c0269d2c>] inet_ioctl+0x9c/0xb0
[<c02231c9>] sock_ioctl+0xc9/0x240
[<c015bc79>] sys_ioctl+0xc9/0x240
[<c01024a3>] syscall_call+0x7/0xb
Code: 4c 24 04 8b 44 24 18 89 1c 24 89 44 24 08 e8 f2 fe ff ff 89 c1 8b 53 08 ff 42 68 0f 8e 0b 02 00 00 8b 5c 24 0c 89 c8 83 c4 10 c3 <0f> 0b 57 00 f5 59 2c c0 eb be 8b 44 24 04 8b 40 30 89 44 24 04
<7>tap0: no IPv6 routers presentFlo
Signature · 2 lines
Florian Lohoff [email protected] +49-171-2280134 Heisenberg may have been here.
Quoted 4 lines · Florian Lohoff
while using the bridging code between a tap0 and a real eth1 i got this:
Linux zmgr1.wstk.mediaways.net 2.6.10-zmgr-p3cel #1 Mon Jan 24 16:15:39 CET 2005 i686 GNU/Linux
^^^^^^^^^^
Would be interesting to see if this shows up with a plain 2.6.10 as well. Do you have time to check that?
Looks like br_sysfs_addif() forgot to add a dentry to the kobj passed to sysfs_create_link(), but I'm not too familiar with that code.
Quoted 13 lines
UP, P3 Celeron, Non-Preempt, Vanilla Kernel
kernel BUG at
fs/sysfs/symlink.c:87!
invalid operand: 0000 [#1]Modules linked in: ppp_deflate bsd_comp ppp_async crc_ccitt ppp_generic slhc 3c59x bridge tun autofs eepro100 e100 mii i2c_i801 i2c_core uhci_hcd usbcore CPU: 0 EIP: 0060:[<c017cac6>] Not tainted VLI EFLAGS: 00010246 (2.6.10-zmgr-p3cel)EIP is at
sysfs_create_link+0x56/0x60
eax:c45ef738ebx: 00000000 ecx:c709f000edx:c39b3ec0
esi:c8880878edi:c7915728ebp:c79156a0esp:c4d91e94
ds: 007b es: 007b ss: 0068
Process brctl (pid: 3500, threadinfo=c4d90000 task=c52b25e0)
Quoted 16 lines
Stack: c017b8cf c68ba7e4 c8880824 00000000 c887aa57 c45ef738 c7915728 c709f000
c45ef220 c709f000 c79156a0 c45ef220 00000000 c887762d c79156a0 c79156a0
c709f090 00000001 c709f000 c45ef220 ffffffed c4d91f34 c8877c34 c45ef220
Call Trace:
[<c017b8cf>] sysfs_create_file+0x2f/0x50
[<c887aa57>] br_sysfs_addif+0xe7/0x140 [bridge]
[<c887762d>] br_add_if+0xbd/0x160 [bridge]
[<c8877c34>] add_del_if+0x64/0x80 [bridge]
[<c022d564>] dev_ifsioc+0x384/0x3f0
[<c022d7b7>] dev_ioctl+0x1e7/0x260
[<c0269d2c>] inet_ioctl+0x9c/0xb0
[<c02231c9>] sock_ioctl+0xc9/0x240
[<c015bc79>] sys_ioctl+0xc9/0x240
[<c01024a3>] syscall_call+0x7/0xb
Code: 4c 24 04 8b 44 24 18 89 1c 24 89 44 24 08 e8 f2 fe ff ff 89 c1 8b 53 08 ff 42 68 0f 8e 0b 02 00 00 8b 5c 24 0c 89 c8 83 c4 10 c3 <0f> 0b 57 00 f5 59 2c c0 eb be 8b 44 24 04 8b 40 30 89 44 24 04
<7>tap0: no IPv6 routers presentJörn
Signature · 2 lines
Good warriors cause others to come to them and do not go to others. -- Sun Tzu
Quoted 4 lines · Jörn Engel
Quoted 1 line
Linux zmgr1.wstk.mediaways.net 2.6.10-zmgr-p3cel #1 Mon Jan 24 16:15:39 CET 2005 i686 GNU/Linux
^^^^^^^^^^Would be interesting to see if this shows up with a plain 2.6.10 as well. Do you have time to check that?
Debian - make-kpkg --append-to-version=-zmgr-p3cel
I am very shure this is vanilla - I compiled it myself just an hour ago.
Quoted 2 lines
Looks like
br_sysfs_addif()forgot to add a dentry to the kobj passed tosysfs_create_link(), but I'm not too familiar with that code.
Flo
Signature · 2 lines
Florian Lohoff [email protected] +49-171-2280134 Heisenberg may have been here.
Quoted 6 lines · Florian Lohoff
Hi,
while using the bridging code between a tap0 and a real eth1 i got this:Linux zmgr1.wstk.mediaways.net 2.6.10-zmgr-p3cel #1 Mon Jan 24 16:15:39 CET 2005 i686 GNU/Linux
UP, P3 Celeron, Non-Preempt, Vanilla Kernel
brctl addbr br0
brctl addif br0 tap0
brctl addif br0 eth0
ifconfig br0 up
Oops
In this order it works
brctl addbr br0
ifconfig br0 up
brctl addif br0 tap0
brctl addif br0 eth0
Flo
Signature · 2 lines
Florian Lohoff [email protected] +49-171-2280134 Heisenberg may have been here.
Quoted 13 lines · Florian Lohoff
Quoted 6 lines · Florian Lohoff
Hi,
while using the bridging code between a tap0 and a real eth1 i got this:Linux zmgr1.wstk.mediaways.net 2.6.10-zmgr-p3cel #1 Mon Jan 24 16:15:39 CET 2005 i686 GNU/Linux
UP, P3 Celeron, Non-Preempt, Vanilla Kernel
brctl addbr br0
brctl addif br0 tap0
brctl addif br0 eth0
ifconfig br0 up
Quoted 8 lines
Oops
In this order it works
brctl addbr br0
ifconfig br0 up
brctl addif br0 tap0
brctl addif br0 eth0
Doesn't look too complicated, but I'm not familiar enough with the bridge code. Setting Stephen on CC:, he should know a lot better.
Jörn
Signature · 3 lines
When you close your hand, you own nothing. When you open it up, you own the whole world. -- Li Mu Bai in Tiger & Dragon
I can't reproduce this with 2.6.11-rc2, could you try this patch to see if it matters.
Puzzled, because the assert is.
BUG_ON(!kobj || !kobj->dentry || !name);
and call is
err = sysfs_create_link(&p->kobj, &br->dev->class_dev.kobj, SYSFS_BRIDGE_PORT_LINK);
kobj can't be NULL, because &p->kobj can't be NULL kobj->dentry is created by kobject_add name is SYSFS_BRIDGE_PORT_LINK ("bridge")
The kobj->dentry should have been created by kobject_add()
kobject_set_name(&p->kobj, SYSFS_BRIDGE_PORT_ATTR); p->kobj.ktype = &brport_ktype; p->kobj.parent = &(p->dev->class_dev.kobj); p->kobj.kset = NULL; err = kobject_add(&p->kobj); and kobject_add does. err = create_dir(kobj);
create_dir calls sysfs_create_dir(kobj).
===================
Since kobject_register initializes more fields, perhaps some part of kobject_add got confused. Try this.
net/bridge/br_sysfs_if.c +1 -1
@@ -229,7 +229,7 @@ p->kobj.parent = &(p->dev->class_dev.kobj); p->kobj.kset =NULL ; - err =kobject_add (&p->kobj); + err =kobject_register (&p->kobj);if (err) goto out1;