1 diff -urNp linux-890/arch/i386/mm/fault.c linux-900/arch/i386/mm/fault.c
2 --- linux-890/arch/i386/mm/fault.c
3 +++ linux-900/arch/i386/mm/fault.c
4 @@ -178,9 +178,10 @@ asmlinkage void do_page_fault(struct pt_
5 * If we're in an interrupt or have no user
6 * context, we must not take the fault..
8 - if (in_interrupt() || !mm)
10 + if (tsk->in_page_fault || in_interrupt() || !mm)
13 + tsk->in_page_fault = 1;
14 down_read(&mm->mmap_sem);
16 vma = find_vma(mm, address);
17 @@ -256,6 +257,7 @@ good_area:
18 tsk->thread.screen_bitmap |= 1 << bit;
20 up_read(&mm->mmap_sem);
21 + tsk->in_page_fault = 0;
25 @@ -264,6 +266,7 @@ good_area:
28 up_read(&mm->mmap_sem);
29 + tsk->in_page_fault = 0;
31 /* User mode accesses just cause a SIGSEGV */
33 @@ -304,6 +307,7 @@ no_context:
34 * terminate things with extreme prejudice.
40 if (address < PAGE_SIZE)
41 @@ -336,6 +340,7 @@ out_of_memory:
44 up_read(&mm->mmap_sem);
45 + tsk->in_page_fault = 0;
46 printk("VM: killing process %s\n", tsk->comm);
49 @@ -343,6 +348,7 @@ out_of_memory:
52 up_read(&mm->mmap_sem);
53 + tsk->in_page_fault = 0;
56 * Send a sigbus, regardless of whether we were in kernel
57 diff -urNp linux-890/include/linux/sched.h linux-900/include/linux/sched.h
58 --- linux-890/include/linux/sched.h
59 +++ linux-900/include/linux/sched.h
60 @@ -339,7 +339,7 @@ struct task_struct {
61 int pdeath_signal; /* The signal sent when the parent dies */
63 unsigned long personality;
65 + int did_exec:1, in_page_fault:1;
66 unsigned task_dumpable:1;