* Copyright (C) 1995 Linus Torvalds
*/
-#include <linux/config.h>
#include <linux/sched.h>
#include <linux/kernel.h>
#include <linux/mm.h>
by ignoring such an instruction. */
if (cause == 0) {
unsigned int insn;
- __get_user(insn, (unsigned int *)regs->pc);
+ __get_user(insn, (unsigned int __user *)regs->pc);
if ((insn >> 21 & 0x1f) == 0x1f &&
/* ldq ldl ldt lds ldg ldf ldwu ldbu */
(1ul << (insn >> 26) & 0x30f00001400ul)) {
/* If we're in an interrupt context, or have no user context,
we must not take the fault. */
- if (!mm || in_interrupt())
+ if (!mm || in_atomic())
goto no_context;
#ifdef CONFIG_ALPHA_LARGE_VMALLOC
/* We ran out of memory, or some other thing happened to us that
made us unable to handle the page fault gracefully. */
out_of_memory:
- if (current->pid == 1) {
+ if (is_init(current)) {
yield();
down_read(&mm->mmap_sem);
goto survive;
}
- printk(KERN_ALERT "VM: killing process %s(%d)\n",
- current->comm, current->pid);
+ printk(KERN_ALERT "VM: killing process %s(%d:#%u)\n",
+ current->comm, current->pid, current->xid);
if (!user_mode(regs))
goto no_context;
do_exit(SIGKILL);