bridge_list orphans in linux-2.4
Hi all,
We use linux-2.4.20 in one of our products and we've found what looks to be a problem in the bridge module. (I know this is old code but we don't send our customers kernel upgrades unless we really have to!)
The problem is that some of our bridges have become orphaned from the bridge module. Specifically
ifconfig ourbridgename
shows that the device "ourbridgename" is known to the kernel, but
brctl show
does not list "ourbridgename".
I've looked through the bridge module and it seems that the most likely explanation is that bridge_list in br_if.c has become corrupted, causing the bridge called "ourbridgename" to become orphaned.
I cannot see how this would happen, however, since bridge_list is only ever referenced under the ioctl_mutex. I should also point out that br_del_bridge() is not called by our application.
I noticed that in later kernels the ioctl_mutex has been replaced by the rtnl_lock(). Why was this done? Could this be related to our problem?
TIA,
Alex
Quoted 9 lines · On Thu, 21 Sep 2006 14:42:22 +0100 Alex Zeffertt <[email protected]>…
Hi all,
We use linux-2.4.20 in one of our products and we've found what looks to be a problem in the bridge module. (I know this is old code but we don't send our customers kernel upgrades unless we really have to!)
The problem is that some of our bridges have become orphaned from the bridge module. Specifically
Quoted 7 lines
ifconfig ourbridgename
shows that the device "ourbridgename" is known to the kernel, but
brctl show
does not list "ourbridgename".
You need to find a sequence of commands that reproduces it. Unless you run multiple commands in parallel, I don't think there should be a problem with 2.4.
Quoted 11 lines
I've looked through the bridge module and it seems that the most likely explanation is that
bridge_listinbr_if.chas become corrupted, causing the bridge called "ourbridgename" to become orphaned.I cannot see how this would happen, however, since
bridge_listis only ever referenced under theioctl_mutex. I should also point out thatbr_del_bridge()is not called by our application.I noticed that in later kernels the
ioctl_mutexhas been replaced by thertnl_lock(). Why was this done? Could this be related to our problem?
In 2.6 it was observed that all changes to bridge list were already being done under the RT netlink mutex, so no additional locking was needed.
Signature · 1 line
Stephen Hemminger <[email protected]>