Skip to content

Commit

Permalink
sparc: Use page_fault_out_of_memory() for VM_FAULT_OOM.
Browse files Browse the repository at this point in the history
As noted by Nick Piggin.

Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
David S. Miller committed Aug 3, 2009
1 parent 9a926d8 commit a923c28
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
7 changes: 4 additions & 3 deletions arch/sparc/mm/fault_32.c
Original file line number Diff line number Diff line change
Expand Up @@ -319,9 +319,10 @@ asmlinkage void do_sparc_fault(struct pt_regs *regs, int text_fault, int write,
*/
out_of_memory:
up_read(&mm->mmap_sem);
printk("VM: killing process %s\n", tsk->comm);
if (from_user)
do_group_exit(SIGKILL);
if (from_user) {
pagefault_out_of_memory();
return;
}
goto no_context;

do_sigbus:
Expand Down
7 changes: 4 additions & 3 deletions arch/sparc/mm/fault_64.c
Original file line number Diff line number Diff line change
Expand Up @@ -447,9 +447,10 @@ asmlinkage void __kprobes do_sparc64_fault(struct pt_regs *regs)
out_of_memory:
insn = get_fault_insn(regs, insn);
up_read(&mm->mmap_sem);
printk("VM: killing process %s\n", current->comm);
if (!(regs->tstate & TSTATE_PRIV))
do_group_exit(SIGKILL);
if (!(regs->tstate & TSTATE_PRIV)) {
pagefault_out_of_memory();
return;
}
goto handle_kernel_fault;

intr_or_no_mm:
Expand Down

0 comments on commit a923c28

Please sign in to comment.