]> git.hungrycats.org Git - linux/commitdiff
[BRIDGE]: Fix rmmod race.
authorStephen Hemminger <shemminger@osdl.org>
Fri, 16 Apr 2004 07:12:55 +0000 (00:12 -0700)
committerStephen Hemminger <shemminger@osdl.org>
Fri, 16 Apr 2004 07:12:55 +0000 (00:12 -0700)
Fix observed race between removing bridge module and ip packets
in flight.  Need to remove the hook last, after all bridges are gone
not the other way around.

net/bridge/br.c

index e5f6c19236f40cb994fa93b5b3ba8cb65bfec16b..2f02b889c496035099f27caae2070046b0db3a01 100644 (file)
@@ -54,16 +54,17 @@ static void __exit br_deinit(void)
 #endif
        unregister_netdevice_notifier(&br_device_notifier);
        brioctl_set(NULL);
-       br_handle_frame_hook = NULL;
+
+       br_cleanup_bridges();
+
+       synchronize_net();
 
 #if defined(CONFIG_ATM_LANE) || defined(CONFIG_ATM_LANE_MODULE)
        br_fdb_get_hook = NULL;
        br_fdb_put_hook = NULL;
 #endif
 
-       br_cleanup_bridges();
-
-       synchronize_net();
+       br_handle_frame_hook = NULL;
 }
 
 EXPORT_SYMBOL(br_should_route_hook);