patch-2.4.20 linux-2.4.20/net/bridge/br.c
Next file: linux-2.4.20/net/bridge/br_if.c
Previous file: linux-2.4.20/net/bluetooth/sco.c
Back to the patch index
Back to the overall index
- Lines: 33
- Date:
Thu Nov 28 15:53:15 2002
- Orig file:
linux-2.4.19/net/bridge/br.c
- Orig date:
Mon Feb 25 11:38:14 2002
diff -urN linux-2.4.19/net/bridge/br.c linux-2.4.20/net/bridge/br.c
@@ -21,6 +21,7 @@
#include <linux/etherdevice.h>
#include <linux/init.h>
#include <linux/if_bridge.h>
+#include <linux/brlock.h>
#include <asm/uaccess.h>
#include "br_private.h"
@@ -53,11 +54,6 @@
return 0;
}
-static void __br_clear_frame_hook(void)
-{
- br_handle_frame_hook = NULL;
-}
-
static void __br_clear_ioctl_hook(void)
{
br_ioctl_hook = NULL;
@@ -67,7 +63,11 @@
{
unregister_netdevice_notifier(&br_device_notifier);
br_call_ioctl_atomic(__br_clear_ioctl_hook);
- net_call_rx_atomic(__br_clear_frame_hook);
+
+ br_write_lock_bh(BR_NETPROTO_LOCK);
+ br_handle_frame_hook = NULL;
+ br_write_unlock_bh(BR_NETPROTO_LOCK);
+
#if defined(CONFIG_ATM_LANE) || defined(CONFIG_ATM_LANE_MODULE)
br_fdb_get_hook = NULL;
br_fdb_put_hook = NULL;
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)