Commit f9c497c4aea28be826b8450a5339952f2ffc705e

Authored by Nick Piggin
Committed by Linus Torvalds
1 parent b7e5d1f041

frv: invoke oom-killer from page fault

As explained in commit 1c0fe6e3bd ("mm: invoke oom-killer from page
fault") , we want to call the architecture independent oom killer when
getting an unexplained OOM from handle_mm_fault, rather than simply
killing current.

Signed-off-by: Nick Piggin <npiggin@suse.de>
Acked-by: David Howells <dhowells@redhat.com>
Acked-by: David Rientjes <rientjes@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

Showing 1 changed file with 4 additions and 4 deletions Side-by-side Diff

... ... @@ -257,10 +257,10 @@
257 257 */
258 258 out_of_memory:
259 259 up_read(&mm->mmap_sem);
260   - printk("VM: killing process %s\n", current->comm);
261   - if (user_mode(__frame))
262   - do_group_exit(SIGKILL);
263   - goto no_context;
  260 + if (!user_mode(__frame))
  261 + goto no_context;
  262 + pagefault_out_of_memory();
  263 + return;
264 264  
265 265 do_sigbus:
266 266 up_read(&mm->mmap_sem);