From b5ed54e94d324f17c97852296d61a143f01b227a Mon Sep 17 00:00:00 2001 From: stephen hemminger Date: Mon, 15 Nov 2010 06:38:13 +0000 Subject: bridge: fix RCU races with bridge port The macro br_port_exists() is not enough protection when only RCU is being used. There is a tiny race where other CPU has cleared port handler hook, but is bridge port flag might still be set. Signed-off-by: Stephen Hemminger Signed-off-by: David S. Miller --- net/bridge/br_notify.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'net/bridge/br_notify.c') diff --git a/net/bridge/br_notify.c b/net/bridge/br_notify.c index 404d4e14c6a..ef2175c8b91 100644 --- a/net/bridge/br_notify.c +++ b/net/bridge/br_notify.c @@ -32,7 +32,7 @@ struct notifier_block br_device_notifier = { static int br_device_event(struct notifier_block *unused, unsigned long event, void *ptr) { struct net_device *dev = ptr; - struct net_bridge_port *p = br_port_get(dev); + struct net_bridge_port *p; struct net_bridge *br; int err; -- cgit v1.2.3-18-g5258