patch-2.4.26 linux-2.4.26/arch/i386/mm/init.c

Next file: linux-2.4.26/arch/ia64/ia32/ia32_signal.c
Previous file: linux-2.4.26/arch/i386/kernel/smpboot.c
Back to the patch index
Back to the overall index

diff -urN linux-2.4.25/arch/i386/mm/init.c linux-2.4.26/arch/i386/mm/init.c
@@ -510,7 +510,15 @@
 
 	if (!mem_map)
 		BUG();
-	
+#ifdef CONFIG_HIGHMEM
+	/* check that fixmap and pkmap do not overlap */
+	if (PKMAP_BASE+LAST_PKMAP*PAGE_SIZE >= FIXADDR_START) {
+		printk(KERN_ERR "fixmap and kmap areas overlap - this will crash\n");
+		printk(KERN_ERR "pkstart: %lxh pkend: %lxh fixstart %lxh\n",
+				PKMAP_BASE, PKMAP_BASE+LAST_PKMAP*PAGE_SIZE, FIXADDR_START);
+		BUG();
+	}
+#endif
 	set_max_mapnr_init();
 
 	high_memory = (void *) __va(max_low_pfn * PAGE_SIZE);

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