X-Git-Url: http://www.pilppa.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=arch%2Fx86%2Fmm%2Ffault.c;h=4c056b5d6a956712691748f31b5bbbae4f4b8800;hb=a9de18eb761f7c1c860964b2e5addc1a35c7e861;hp=57ec8c86a8776700729f682fc8a9b60b6a3482cd;hpb=6a94cb73064c952255336cc57731904174b2c58f;p=linux-2.6-omap-h63xx.git diff --git a/arch/x86/mm/fault.c b/arch/x86/mm/fault.c index 57ec8c86a87..4c056b5d6a9 100644 --- a/arch/x86/mm/fault.c +++ b/arch/x86/mm/fault.c @@ -26,6 +26,7 @@ #include #include #include +#include #include #include @@ -589,6 +590,8 @@ void __kprobes do_page_fault(struct pt_regs *regs, unsigned long error_code) unsigned long address; int write, si_code; int fault; + unsigned long *stackend; + #ifdef CONFIG_X86_64 unsigned long flags; int sig; @@ -842,6 +845,10 @@ no_context: show_fault_oops(regs, error_code, address); + stackend = end_of_stack(tsk); + if (*stackend != STACK_END_MAGIC) + printk(KERN_ALERT "Thread overran stack, or stack corrupted\n"); + tsk->thread.cr2 = address; tsk->thread.trap_no = 14; tsk->thread.error_code = error_code;