patch-2.2.5 linux/net/core/neighbour.c

Next file: linux/net/core/sock.c
Previous file: linux/net/core/filter.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.2.4/linux/net/core/neighbour.c linux/net/core/neighbour.c
@@ -337,9 +337,8 @@
 
 	for (np = &tbl->phash_buckets[hash_val]; (n=*np) != NULL; np = &n->next) {
 		if (memcmp(n->key, pkey, key_len) == 0 && n->dev == dev) {
-			net_serialize_enter();
 			*np = n->next;
-			net_serialize_leave();
+			synchronize_bh();
 			if (tbl->pdestructor)
 				tbl->pdestructor(n);
 			kfree(n);
@@ -358,9 +357,8 @@
 		np = &tbl->phash_buckets[h]; 
 		for (np = &tbl->phash_buckets[h]; (n=*np) != NULL; np = &n->next) {
 			if (n->dev == dev || dev == NULL) {
-				net_serialize_enter();
 				*np = n->next;
-				net_serialize_leave();
+				synchronize_bh();
 				if (tbl->pdestructor)
 					tbl->pdestructor(n);
 				kfree(n);
@@ -963,9 +961,8 @@
 		return;
 	for (p = &tbl->parms.next; *p; p = &(*p)->next) {
 		if (*p == parms) {
-			net_serialize_enter();
 			*p = parms->next;
-			net_serialize_leave();
+			synchronize_bh();
 #ifdef CONFIG_SYSCTL
 			neigh_sysctl_unregister(parms);
 #endif
@@ -1014,9 +1011,8 @@
 		printk(KERN_CRIT "neighbour leakage\n");
 	for (tp = &neigh_tables; *tp; tp = &(*tp)->next) {
 		if (*tp == tbl) {
-			net_serialize_enter();
 			*tp = tbl->next;
-			net_serialize_leave();
+			synchronize_bh();
 			break;
 		}
 	}

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)