OSDN Git Service

mm: Silence vmap() allocation failures based on caller gfp_flags
authorFlorian Fainelli <f.fainelli@gmail.com>
Thu, 27 Apr 2017 18:19:00 +0000 (11:19 -0700)
committerGerrit - the friendly Code Review server <code-review@localhost>
Tue, 18 Sep 2018 09:11:06 +0000 (02:11 -0700)
If the caller has set __GFP_NOWARN don't print the following message:
vmap allocation for size 15736832 failed: use vmalloc=<size> to increase
size.

This can happen with the ARM/Linux or ARM64/Linux module loader built
with CONFIG_ARM{,64}_MODULE_PLTS=y which does a first attempt at loading
a large module from module space, then falls back to vmalloc space.

Change-Id: Ib907156055959e22a419b79fb424772baea556d0
Acked-by: Michal Hocko <mhocko@suse.com>
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Git-Commit: 03497d761c55438144fd63534d4223418fdfd345
Git-Repo: git://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
Signed-off-by: Vinayak Menon <vinmenon@codeaurora.org>
mm/vmalloc.c

index ceb7d0d..0db25c1 100644 (file)
@@ -521,7 +521,7 @@ overflow:
                purged = 1;
                goto retry;
        }
-       if (printk_ratelimit())
+       if (!(gfp_mask & __GFP_NOWARN) && printk_ratelimit())
                pr_warn("vmap allocation for size %lu failed: use vmalloc=<size> to increase size\n",
                        size);
        kfree(va);