Merge branch 'sched-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
[pandora-kernel.git] / arch / x86 / mm / fault.c
index 83bb03b..9c5b32e 100644 (file)
@@ -3,7 +3,6 @@
  *  Copyright (C) 2001, 2002 Andi Kleen, SuSE Labs.
  *  Copyright (C) 2008-2009, Red Hat Inc., Ingo Molnar
  */
-#include <linux/magic.h>               /* STACK_END_MAGIC              */
 #include <linux/sched.h>               /* test_thread_flag(), ...      */
 #include <linux/kdebug.h>              /* oops_begin/end, ...          */
 #include <linux/module.h>              /* search_exception_table       */
@@ -649,7 +648,6 @@ no_context(struct pt_regs *regs, unsigned long error_code,
           unsigned long address, int signal, int si_code)
 {
        struct task_struct *tsk = current;
-       unsigned long *stackend;
        unsigned long flags;
        int sig;
 
@@ -709,8 +707,7 @@ no_context(struct pt_regs *regs, unsigned long error_code,
 
        show_fault_oops(regs, error_code, address);
 
-       stackend = end_of_stack(tsk);
-       if (tsk != &init_task && *stackend != STACK_END_MAGIC)
+       if (task_stack_end_corrupted(tsk))
                printk(KERN_EMERG "Thread overran stack, or stack corrupted\n");
 
        tsk->thread.cr2         = address;