patch-2.3.15 linux/net/core/dev_mcast.c

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

diff -u --recursive --new-file v2.3.14/linux/net/core/dev_mcast.c linux/net/core/dev_mcast.c
@@ -123,13 +123,14 @@
 			 */
 			*dmip = dmi->next;
 			dev->mc_count--;
+			write_unlock_bh(&dev_mc_lock);
+
 			kfree_s(dmi,sizeof(*dmi));
+
 			/*
 			 *	We have altered the list, so the card
 			 *	loaded filter is now wrong. Fix it
 			 */
-			write_unlock_bh(&dev_mc_lock);
-
 			dev_mc_upload(dev);
 			return 0;
 		}
@@ -149,10 +150,7 @@
 	int err = 0;
 	struct dev_mc_list *dmi, *dmi1;
 
-	/* RED-PEN: does gfp_any() work now? It requires
-	   true local_bh_disable rather than global.
-	 */
-	dmi1 = (struct dev_mc_list *)kmalloc(sizeof(*dmi), gfp_any());
+	dmi1 = (struct dev_mc_list *)kmalloc(sizeof(*dmi), GFP_ATOMIC);
 
 	write_lock_bh(&dev_mc_lock);
 	for(dmi=dev->mc_list; dmi!=NULL; dmi=dmi->next) {
@@ -257,7 +255,7 @@
 }
 #endif
 
-__initfunc(void dev_mcast_init(void))
+void __init dev_mcast_init(void)
 {
 #ifdef CONFIG_PROC_FS
 	struct proc_dir_entry *ent;

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