X-Git-Url: http://git.rot13.org/?a=blobdiff_plain;f=arch%2Fsh64%2Fmm%2Ffault.c;h=4f72ab33bb2b0a7cb9caae2b09a135f96c8a6ed9;hb=3be11c8f4f2fa194834c2e83540f34da442b8977;hp=f08d0eaf6497d34c716d8f0c5ee4baf2aa4eb27c;hpb=6fb0caa42308923d9e4ed7b36ec077b97c107e24;p=powerpc.git diff --git a/arch/sh64/mm/fault.c b/arch/sh64/mm/fault.c index f08d0eaf64..4f72ab33bb 100644 --- a/arch/sh64/mm/fault.c +++ b/arch/sh64/mm/fault.c @@ -154,7 +154,7 @@ asmlinkage void do_page_fault(struct pt_regs *regs, unsigned long writeaccess, * If we're in an interrupt or have no user * context, we must not take the fault.. */ - if (in_interrupt() || !mm) + if (in_atomic() || !mm) goto no_context; /* TLB misses upon some cache flushes get done under cli() */ @@ -277,7 +277,7 @@ bad_area: show_regs(regs); #endif } - if (tsk->pid == 1) { + if (is_init(tsk)) { panic("INIT had user mode bad_area\n"); } tsk->thread.address = address; @@ -319,14 +319,14 @@ no_context: * us unable to handle the page fault gracefully. */ out_of_memory: - if (current->pid == 1) { + if (is_init(current)) { panic("INIT out of memory\n"); yield(); goto survive; } printk("fault:Out of memory\n"); up_read(&mm->mmap_sem); - if (current->pid == 1) { + if (is_init(current)) { yield(); down_read(&mm->mmap_sem); goto survive;