Commit 7ad9cf1c authored by Stephen Hemminger's avatar Stephen Hemminger Committed by Patrick McHardy

[BRIDGE]: deadlock on device removal

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: default avatarStephen Hemminger <shemminger@osdl.org>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent fc2520bc
......@@ -76,10 +76,12 @@ static int br_device_event(struct notifier_block *unused, unsigned long event, v
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;
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment