diff options
Diffstat (limited to 'mm/page_alloc.c')
-rw-r--r-- | mm/page_alloc.c | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/mm/page_alloc.c b/mm/page_alloc.c index 83a02052bce4..9dd443d89d8b 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c | |||
@@ -1754,7 +1754,6 @@ static DEFINE_RATELIMIT_STATE(nopage_rs, | |||
1754 | 1754 | ||
1755 | void warn_alloc_failed(gfp_t gfp_mask, int order, const char *fmt, ...) | 1755 | void warn_alloc_failed(gfp_t gfp_mask, int order, const char *fmt, ...) |
1756 | { | 1756 | { |
1757 | va_list args; | ||
1758 | unsigned int filter = SHOW_MEM_FILTER_NODES; | 1757 | unsigned int filter = SHOW_MEM_FILTER_NODES; |
1759 | 1758 | ||
1760 | if ((gfp_mask & __GFP_NOWARN) || !__ratelimit(&nopage_rs)) | 1759 | if ((gfp_mask & __GFP_NOWARN) || !__ratelimit(&nopage_rs)) |
@@ -1773,14 +1772,21 @@ void warn_alloc_failed(gfp_t gfp_mask, int order, const char *fmt, ...) | |||
1773 | filter &= ~SHOW_MEM_FILTER_NODES; | 1772 | filter &= ~SHOW_MEM_FILTER_NODES; |
1774 | 1773 | ||
1775 | if (fmt) { | 1774 | if (fmt) { |
1776 | printk(KERN_WARNING); | 1775 | struct va_format vaf; |
1776 | va_list args; | ||
1777 | |||
1777 | va_start(args, fmt); | 1778 | va_start(args, fmt); |
1778 | vprintk(fmt, args); | 1779 | |
1780 | vaf.fmt = fmt; | ||
1781 | vaf.va = &args; | ||
1782 | |||
1783 | pr_warn("%pV", &vaf); | ||
1784 | |||
1779 | va_end(args); | 1785 | va_end(args); |
1780 | } | 1786 | } |
1781 | 1787 | ||
1782 | pr_warning("%s: page allocation failure: order:%d, mode:0x%x\n", | 1788 | pr_warn("%s: page allocation failure: order:%d, mode:0x%x\n", |
1783 | current->comm, order, gfp_mask); | 1789 | current->comm, order, gfp_mask); |
1784 | 1790 | ||
1785 | dump_stack(); | 1791 | dump_stack(); |
1786 | if (!should_suppress_show_mem()) | 1792 | if (!should_suppress_show_mem()) |