aboutsummaryrefslogtreecommitdiffstats
path: root/arch/avr32
diff options
context:
space:
mode:
authorJohannes Weiner <hannes@cmpxchg.org>2013-09-12 18:13:38 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2013-09-12 18:38:01 -0400
commit871341023c771ad233620b7a1fb3d9c7031c4e5c (patch)
treef2b008756dffce639759f74885b23e92886600d6 /arch/avr32
parent94bce453c78996cc4373d5da6cfabe07fcc6d9f9 (diff)
arch: mm: do not invoke OOM killer on kernel fault OOM
Kernel faults are expected to handle OOM conditions gracefully (gup, uaccess etc.), so they should never invoke the OOM killer. Reserve this for faults triggered in user context when it is the only option. Most architectures already do this, fix up the remaining few. Signed-off-by: Johannes Weiner <hannes@cmpxchg.org> Reviewed-by: Michal Hocko <mhocko@suse.cz> Acked-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com> Cc: David Rientjes <rientjes@google.com> Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> Cc: azurIt <azurit@pobox.sk> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/avr32')
-rw-r--r--arch/avr32/mm/fault.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/avr32/mm/fault.c b/arch/avr32/mm/fault.c
index b2f2d2d66849..2ca27b055825 100644
--- a/arch/avr32/mm/fault.c
+++ b/arch/avr32/mm/fault.c
@@ -228,9 +228,9 @@ no_context:
228 */ 228 */
229out_of_memory: 229out_of_memory:
230 up_read(&mm->mmap_sem); 230 up_read(&mm->mmap_sem);
231 pagefault_out_of_memory();
232 if (!user_mode(regs)) 231 if (!user_mode(regs))
233 goto no_context; 232 goto no_context;
233 pagefault_out_of_memory();
234 return; 234 return;
235 235
236do_sigbus: 236do_sigbus: