patch-2.1.80 linux/arch/i386/mm/fault.c

Next file: linux/arch/ppc/kernel/idle.c
Previous file: linux/arch/i386/kernel/smp.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.79/linux/arch/i386/mm/fault.c linux/arch/i386/mm/fault.c
@@ -20,6 +20,7 @@
 #include <asm/system.h>
 #include <asm/uaccess.h>
 #include <asm/pgtable.h>
+#include <asm/hardirq.h>
 
 extern void die_if_kernel(const char *,struct pt_regs *,long);
 
@@ -99,6 +100,8 @@
 	/* get the address */
 	__asm__("movl %%cr2,%0":"=r" (address));
 
+	if (local_irq_count[smp_processor_id()])
+		die_if_kernel("page fault from irq handler",regs,error_code);
 	lock_kernel();
 	tsk = current;
 	mm = tsk->mm;

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