fault.c (b7e56edba4b02f2079042c326a8cd72a44635817) fault.c (96054569190bdec375fe824e48ca1f4e3b53dd36)
1/*
2 * Copyright (C) 1995 Linus Torvalds
3 * Copyright (C) 2001, 2002 Andi Kleen, SuSE Labs.
4 * Copyright (C) 2008-2009, Red Hat Inc., Ingo Molnar
5 */
6#include <linux/magic.h> /* STACK_END_MAGIC */
7#include <linux/sched.h> /* test_thread_flag(), ... */
8#include <linux/kdebug.h> /* oops_begin/end, ... */

--- 788 unchanged lines hidden (view full) ---

797{
798 struct task_struct *tsk = current;
799 struct mm_struct *mm = tsk->mm;
800 int code = BUS_ADRERR;
801
802 up_read(&mm->mmap_sem);
803
804 /* Kernel mode? Handle exceptions or die: */
1/*
2 * Copyright (C) 1995 Linus Torvalds
3 * Copyright (C) 2001, 2002 Andi Kleen, SuSE Labs.
4 * Copyright (C) 2008-2009, Red Hat Inc., Ingo Molnar
5 */
6#include <linux/magic.h> /* STACK_END_MAGIC */
7#include <linux/sched.h> /* test_thread_flag(), ... */
8#include <linux/kdebug.h> /* oops_begin/end, ... */

--- 788 unchanged lines hidden (view full) ---

797{
798 struct task_struct *tsk = current;
799 struct mm_struct *mm = tsk->mm;
800 int code = BUS_ADRERR;
801
802 up_read(&mm->mmap_sem);
803
804 /* Kernel mode? Handle exceptions or die: */
805 if (!(error_code & PF_USER))
805 if (!(error_code & PF_USER)) {
806 no_context(regs, error_code, address);
806 no_context(regs, error_code, address);
807 return;
808 }
807
808 /* User-space => ok to do another page fault: */
809 if (is_prefetch(regs, error_code, address))
810 return;
811
812 tsk->thread.cr2 = address;
813 tsk->thread.error_code = error_code;
814 tsk->thread.trap_no = 14;

--- 326 unchanged lines hidden ---
809
810 /* User-space => ok to do another page fault: */
811 if (is_prefetch(regs, error_code, address))
812 return;
813
814 tsk->thread.cr2 = address;
815 tsk->thread.error_code = error_code;
816 tsk->thread.trap_no = 14;

--- 326 unchanged lines hidden ---