patch-1.3.34 linux/net/ipv4/ipmr.c

Next file: linux/Makefile
Previous file: linux/net/ipv4/icmp.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v1.3.33/linux/net/ipv4/ipmr.c linux/net/ipv4/ipmr.c
@@ -374,6 +374,7 @@
 			sti();
 			return 0;
 		}
+		sti();
 		return -ENOENT;
 	}
 	if(cache)
@@ -398,16 +399,21 @@
 	/*
 	 *	Unsolicited update - thats ok add anyway.
 	 */
-	sti();
-	cache=ipmr_cache_alloc(GFP_KERNEL);
+	 
+	
+	cache=ipmr_cache_alloc(GFP_ATOMIC);
 	if(cache==NULL)
+	{
+		sti();
 		return -ENOMEM;
+	}
 	cache->mfc_flags=MFC_RESOLVED;
 	cache->mfc_origin=mfc->mfcc_origin.s_addr;
 	cache->mfc_mcastgrp=mfc->mfcc_mcastgrp.s_addr;
 	cache->mfc_parent=mfc->mfcc_parent;
 	memcpy(cache->mfc_ttls, mfc->mfcc_ttls,sizeof(cache->mfc_ttls));
 	ipmr_cache_insert(cache);
+	sti();
 	return 0;
 }
  


FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov with Sam's (original) version
of this