Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Nick Piggin and committed by
Linus Torvalds
f9c497c4 b7e5d1f0

+4 -4
+4 -4
arch/frv/mm/fault.c
··· 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);