From: Russell King Date: Sat, 30 Nov 2013 12:52:31 +0000 (+0000) Subject: ARM: pgd allocation: retry on failure X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=8c65da6dc89ccb605d73773b1dd617e72982d971;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git ARM: pgd allocation: retry on failure Make pgd allocation retry on failure; we really need this to succeed otherwise fork() can trigger OOMs. Signed-off-by: Russell King --- diff --git a/arch/arm/mm/pgd.c b/arch/arm/mm/pgd.c index 1046b373d1ae..249379535be2 100644 --- a/arch/arm/mm/pgd.c +++ b/arch/arm/mm/pgd.c @@ -23,7 +23,7 @@ #define __pgd_alloc() kmalloc(PTRS_PER_PGD * sizeof(pgd_t), GFP_KERNEL) #define __pgd_free(pgd) kfree(pgd) #else -#define __pgd_alloc() (pgd_t *)__get_free_pages(GFP_KERNEL, 2) +#define __pgd_alloc() (pgd_t *)__get_free_pages(GFP_KERNEL | __GFP_REPEAT, 2) #define __pgd_free(pgd) free_pages((unsigned long)pgd, 2) #endif