netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 2.4] bridge netfilter deadlock
@ 2006-11-01 19:45 Stephen Hemminger
  2006-11-02  1:29 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Stephen Hemminger @ 2006-11-01 19:45 UTC (permalink / raw)
  To: David Miller; +Cc: netdev

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.

Signed-off-by: Stephen Hemminger <shemminger@osdl.org>

--- linux-2.4.33.3.orig/net/bridge/br_stp.c	2006-10-30 12:46:59.000000000 -0800
+++ linux-2.4.33.3/net/bridge/br_stp.c	2006-10-30 12:53:59.000000000 -0800
@@ -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 */



-- 
Stephen Hemminger <shemminger@osdl.org>

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH 2.4] bridge netfilter deadlock
  2006-11-01 19:45 [PATCH 2.4] bridge netfilter deadlock Stephen Hemminger
@ 2006-11-02  1:29 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2006-11-02  1:29 UTC (permalink / raw)
  To: shemminger; +Cc: netdev

From: Stephen Hemminger <shemminger@osdl.org>
Date: Wed, 1 Nov 2006 11:45:50 -0800

> 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.
> 
> Signed-off-by: Stephen Hemminger <shemminger@osdl.org>

Applied, I'll push this to Willy.

Thanks Stephen.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2006-11-02  1:29 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-11-01 19:45 [PATCH 2.4] bridge netfilter deadlock Stephen Hemminger
2006-11-02  1:29 ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).