aboutsummaryrefslogtreecommitdiffstats
path: root/mm/vmalloc.c
diff options
context:
space:
mode:
authorDmitry Vyukov <dvyukov@google.com>2017-03-16 19:40:27 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2017-03-16 19:56:18 -0400
commit171012f561274784160f666f8398af8b42216e1f (patch)
tree3de492fa1da58baf1ef565c7f13b7edab1c4d3f6 /mm/vmalloc.c
parentd0f33ac9ae7b2a727fb678235ae37baf1d0608d5 (diff)
mm: don't warn when vmalloc() fails due to a fatal signal
When vmalloc() fails it prints a very lengthy message with all the details about memory consumption assuming that it happened due to OOM. However, vmalloc() can also fail due to fatal signal pending. In such case the message is quite confusing because it suggests that it is OOM but the numbers suggest otherwise. The messages can also pollute console considerably. Don't warn when vmalloc() fails due to fatal signal pending. Link: http://lkml.kernel.org/r/20170313114425.72724-1-dvyukov@google.com Signed-off-by: Dmitry Vyukov <dvyukov@google.com> Reviewed-by: Matthew Wilcox <mawilcox@microsoft.com> Acked-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com> Acked-by: Michal Hocko <mhocko@suse.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm/vmalloc.c')
-rw-r--r--mm/vmalloc.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/mm/vmalloc.c b/mm/vmalloc.c
index 0dd80222b20b..0b057628a7ba 100644
--- a/mm/vmalloc.c
+++ b/mm/vmalloc.c
@@ -1683,7 +1683,7 @@ static void *__vmalloc_area_node(struct vm_struct *area, gfp_t gfp_mask,
1683 1683
1684 if (fatal_signal_pending(current)) { 1684 if (fatal_signal_pending(current)) {
1685 area->nr_pages = i; 1685 area->nr_pages = i;
1686 goto fail; 1686 goto fail_no_warn;
1687 } 1687 }
1688 1688
1689 if (node == NUMA_NO_NODE) 1689 if (node == NUMA_NO_NODE)
@@ -1709,6 +1709,7 @@ fail:
1709 warn_alloc(gfp_mask, NULL, 1709 warn_alloc(gfp_mask, NULL,
1710 "vmalloc: allocation failure, allocated %ld of %ld bytes", 1710 "vmalloc: allocation failure, allocated %ld of %ld bytes",
1711 (area->nr_pages*PAGE_SIZE), area->size); 1711 (area->nr_pages*PAGE_SIZE), area->size);
1712fail_no_warn:
1712 vfree(area->addr); 1713 vfree(area->addr);
1713 return NULL; 1714 return NULL;
1714} 1715}