diff options
| author | Nick Piggin <npiggin@suse.de> | 2010-06-04 17:14:49 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-06-04 18:21:44 -0400 |
| commit | 68db30ce609a8fc21b95f38f509c65dab0ecfa96 (patch) | |
| tree | 647eed3c9500f9cd6663177f9b2c99b7233bb25e | |
| parent | f9c497c4aea28be826b8450a5339952f2ffc705e (diff) | |
m32r: 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 Rientjes <rientjes@google.com>
Cc: Hirokazu Takata <takata@linux-m32r.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
| -rw-r--r-- | arch/m32r/mm/fault.c | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/arch/m32r/mm/fault.c b/arch/m32r/mm/fault.c index 28ee389e5f5a..b8ec002aef8e 100644 --- a/arch/m32r/mm/fault.c +++ b/arch/m32r/mm/fault.c | |||
| @@ -188,7 +188,6 @@ good_area: | |||
| 188 | if ((error_code & ACE_INSTRUCTION) && !(vma->vm_flags & VM_EXEC)) | 188 | if ((error_code & ACE_INSTRUCTION) && !(vma->vm_flags & VM_EXEC)) |
| 189 | goto bad_area; | 189 | goto bad_area; |
| 190 | 190 | ||
| 191 | survive: | ||
| 192 | /* | 191 | /* |
| 193 | * If for any reason at all we couldn't handle the fault, | 192 | * If for any reason at all we couldn't handle the fault, |
| 194 | * make sure we exit gracefully rather than endlessly redo | 193 | * make sure we exit gracefully rather than endlessly redo |
| @@ -271,15 +270,10 @@ no_context: | |||
| 271 | */ | 270 | */ |
| 272 | out_of_memory: | 271 | out_of_memory: |
| 273 | up_read(&mm->mmap_sem); | 272 | up_read(&mm->mmap_sem); |
| 274 | if (is_global_init(tsk)) { | 273 | if (!(error_code & ACE_USERMODE)) |
| 275 | yield(); | 274 | goto no_context; |
| 276 | down_read(&mm->mmap_sem); | 275 | pagefault_out_of_memory(); |
| 277 | goto survive; | 276 | return; |
| 278 | } | ||
| 279 | printk("VM: killing process %s\n", tsk->comm); | ||
| 280 | if (error_code & ACE_USERMODE) | ||
| 281 | do_group_exit(SIGKILL); | ||
| 282 | goto no_context; | ||
| 283 | 277 | ||
| 284 | do_sigbus: | 278 | do_sigbus: |
| 285 | up_read(&mm->mmap_sem); | 279 | up_read(&mm->mmap_sem); |
