Commit a923c28f authored by David S. Miller's avatar David S. Miller

sparc: Use page_fault_out_of_memory() for VM_FAULT_OOM.

As noted by Nick Piggin.
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 9a926d86
...@@ -319,9 +319,10 @@ asmlinkage void do_sparc_fault(struct pt_regs *regs, int text_fault, int write, ...@@ -319,9 +319,10 @@ asmlinkage void do_sparc_fault(struct pt_regs *regs, int text_fault, int write,
*/ */
out_of_memory: out_of_memory:
up_read(&mm->mmap_sem); up_read(&mm->mmap_sem);
printk("VM: killing process %s\n", tsk->comm); if (from_user) {
if (from_user) pagefault_out_of_memory();
do_group_exit(SIGKILL); return;
}
goto no_context; goto no_context;
do_sigbus: do_sigbus:
......
...@@ -447,9 +447,10 @@ asmlinkage void __kprobes do_sparc64_fault(struct pt_regs *regs) ...@@ -447,9 +447,10 @@ asmlinkage void __kprobes do_sparc64_fault(struct pt_regs *regs)
out_of_memory: out_of_memory:
insn = get_fault_insn(regs, insn); insn = get_fault_insn(regs, insn);
up_read(&mm->mmap_sem); up_read(&mm->mmap_sem);
printk("VM: killing process %s\n", current->comm); if (!(regs->tstate & TSTATE_PRIV)) {
if (!(regs->tstate & TSTATE_PRIV)) pagefault_out_of_memory();
do_group_exit(SIGKILL); return;
}
goto handle_kernel_fault; goto handle_kernel_fault;
intr_or_no_mm: intr_or_no_mm:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment