summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2009-08-03 04:17:15 +0200
committerDavid S. Miller <davem@davemloft.net>2009-08-03 04:17:15 +0200
commita923c28fc538a4161b15e9b5d7d48248d73d3e6f (patch)
tree93c56ef8e84c2210b6fe568568556700b96a620a
parentsparc64: Sign extend length arg to truncate syscalls when compat. (diff)
downloadlinux-a923c28fc538a4161b15e9b5d7d48248d73d3e6f.tar.xz
linux-a923c28fc538a4161b15e9b5d7d48248d73d3e6f.zip
sparc: Use page_fault_out_of_memory() for VM_FAULT_OOM.
As noted by Nick Piggin. Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--arch/sparc/mm/fault_32.c7
-rw-r--r--arch/sparc/mm/fault_64.c7
2 files changed, 8 insertions, 6 deletions
diff --git a/arch/sparc/mm/fault_32.c b/arch/sparc/mm/fault_32.c
index a5e30c642ee3..b99f81c4906f 100644
--- a/arch/sparc/mm/fault_32.c
+++ b/arch/sparc/mm/fault_32.c
@@ -319,9 +319,10 @@ no_context:
*/
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:
diff --git a/arch/sparc/mm/fault_64.c b/arch/sparc/mm/fault_64.c
index e5620b27c8bf..43b0da96a4fb 100644
--- a/arch/sparc/mm/fault_64.c
+++ b/arch/sparc/mm/fault_64.c
@@ -447,9 +447,10 @@ handle_kernel_fault:
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: