netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] bridge deadlock on device removal
@ 2004-09-06 12:15 Stephen Hemminger
  2004-09-07 21:02 ` David S. Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Stephen Hemminger @ 2004-09-06 12:15 UTC (permalink / raw)
  To: David Miller; +Cc: netdev

Fixes: https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=131569
Dead lock in bridge when removing device interface module. br_del_if
assumes br->lock not held.

This fixes case of:
	brctl addbr b0
	brctl addif b0 eth0
	rmmod eth0

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

diff -Nru a/net/bridge/br_notify.c b/net/bridge/br_notify.c
--- a/net/bridge/br_notify.c	2004-09-06 04:45:31 -07:00
+++ b/net/bridge/br_notify.c	2004-09-06 04:45:31 -07:00
@@ -76,10 +76,12 @@
 		break;
 
 	case NETDEV_UNREGISTER:
+		spin_unlock_bh(&br->lock);
 		br_del_if(br, dev);
-		break;
+		goto done;
 	} 
 	spin_unlock_bh(&br->lock);
 
+ done:
 	return NOTIFY_DONE;
 }

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

* Re: [PATCH] bridge deadlock on device removal
  2004-09-06 12:15 [PATCH] bridge deadlock on device removal Stephen Hemminger
@ 2004-09-07 21:02 ` David S. Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David S. Miller @ 2004-09-07 21:02 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: netdev

On Mon, 6 Sep 2004 05:15:23 -0700
Stephen Hemminger <shemminger@osdl.org> wrote:

> Fixes: https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=131569
> Dead lock in bridge when removing device interface module. br_del_if
> assumes br->lock not held.
> 
> This fixes case of:
> 	brctl addbr b0
> 	brctl addif b0 eth0
> 	rmmod eth0
> 
> Signed-off-by: Stephen Hemminger <shemminger@osdl.org>

Will apply, thanks Stephen.

Is this a 2.6.x only issue?

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

end of thread, other threads:[~2004-09-07 21:02 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-09-06 12:15 [PATCH] bridge deadlock on device removal Stephen Hemminger
2004-09-07 21:02 ` David S. 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).