]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - arch/avr32/mm/fault.c
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/teigland/dlm
[linux-2.6-omap-h63xx.git] / arch / avr32 / mm / fault.c
index ae2d2c593b2b027efa74f6a69ab31efabf8ec5b6..ce4e4296b95467f3e0b715a9ec953398917be8f7 100644 (file)
@@ -160,7 +160,7 @@ bad_area:
                if (exception_trace && printk_ratelimit())
                        printk("%s%s[%d]: segfault at %08lx pc %08lx "
                               "sp %08lx ecr %lu\n",
-                              is_init(tsk) ? KERN_EMERG : KERN_INFO,
+                              is_global_init(tsk) ? KERN_EMERG : KERN_INFO,
                               tsk->comm, tsk->pid, address, regs->pc,
                               regs->sp, ecr);
                _exception(SIGSEGV, regs, code, address);
@@ -189,6 +189,8 @@ no_context:
 
        page = sysreg_read(PTBR);
        printk(KERN_ALERT "ptbr = %08lx", page);
+       if (address >= TASK_SIZE)
+               page = (unsigned long)swapper_pg_dir;
        if (page) {
                page = ((unsigned long *)page)[address >> 22];
                printk(" pgd = %08lx", page);
@@ -209,14 +211,14 @@ no_context:
         */
 out_of_memory:
        up_read(&mm->mmap_sem);
-       if (is_init(current)) {
+       if (is_global_init(current)) {
                yield();
                down_read(&mm->mmap_sem);
                goto survive;
        }
        printk("VM: Killing process %s\n", tsk->comm);
        if (user_mode(regs))
-               do_exit(SIGKILL);
+               do_group_exit(SIGKILL);
        goto no_context;
 
 do_sigbus:
@@ -231,7 +233,7 @@ do_sigbus:
        if (exception_trace)
                printk("%s%s[%d]: bus error at %08lx pc %08lx "
                       "sp %08lx ecr %lu\n",
-                      is_init(tsk) ? KERN_EMERG : KERN_INFO,
+                      is_global_init(tsk) ? KERN_EMERG : KERN_INFO,
                       tsk->comm, tsk->pid, address, regs->pc,
                       regs->sp, ecr);