Skip to contentSkip to conversation

bridge netfilter deadlock

PATCH Applied Stephen Hemminger 2 participants 2 messages Nov 1, 2006 – Nov 2, 2006

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 bridge netfilter deadlock

A deadlock was found in bridge netfilter code (2.4 only), when a device is removed. The device removal path causes a BPDU to be generated and ends up
self deadlocking on the BR lock.

Simple fix would be to avoid generating config bpdu's immediately when becoming root bridge, and just let the first hello timer tick do that.

net/bridge/br_stp.c +2 -2
@@ -140,8 +140,8 @@
 	br->forward_delay = br->bridge_forward_delay;
 	br_topology_change_detection(br);
 	br_timer_clear(&br->tcn_timer);
-	br_config_bpdu_generation(br);
-	br_timer_set(&br->hello_timer, jiffies);
+
+	br_timer_set(&br->hello_timer, jiffies - br->hello_time);
 }
 
 /* called under bridge lock */
Signature · 1 line
Stephen Hemminger <[email protected]>
maintainer Applied
#1 lore raw

From: Stephen Hemminger <[email protected]>
Date: Wed, 1 Nov 2006 11:45:50 -0800

Quoted 9 lines

A deadlock was found in bridge netfilter code (2.4 only), when a device is removed. The device removal path causes a BPDU to be generated and ends up
self deadlocking on the BR lock.

Simple fix would be to avoid generating config bpdu's immediately when becoming root bridge, and just let the first hello timer tick do that.

Applied, I'll push this to Willy.

Thanks Stephen.