From mboxrd@z Thu Jan 1 00:00:00 1970 Date: Thu, 21 Sep 2006 15:56:29 -0700 From: Stephen Hemminger Message-ID: <20060921155629.6d3eb7b3@localhost.localdomain> In-Reply-To: <451296BE.1060002@cambridgebroadband.com> References: <451296BE.1060002@cambridgebroadband.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [Bridge] bridge_list orphans in linux-2.4 List-Id: Linux Ethernet Bridging List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Alex Zeffertt Cc: bridge@lists.osdl.org On Thu, 21 Sep 2006 14:42:22 +0100 Alex Zeffertt wrote: > 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". 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. > 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? 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. -- Stephen Hemminger