patch-2.1.34 linux/mm/kmalloc.c

Next file: linux/mm/memory.c
Previous file: linux/mm/filemap.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.33/linux/mm/kmalloc.c linux/mm/kmalloc.c
@@ -266,8 +266,8 @@
 	priority &= GFP_LEVEL_MASK;
 
 /* Sanity check... */
-#if 0	/* no longer valid */
-	if (intr_count && priority != GFP_ATOMIC) {
+
+	if (in_interrupt() && priority != GFP_ATOMIC) {
 		static int count = 0;
 		if (++count < 5) {
 			printk("kmalloc called nonatomically from interrupt %p\n",
@@ -275,7 +275,7 @@
 			priority = GFP_ATOMIC;
 		}
 	}
-#endif
+
 	save_flags(flags);
 	cli();
 	page = *pg;

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov