Skip to content

Commit 8c65da6

Browse files
author
Russell King
committed
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 <[email protected]>
1 parent 4808972 commit 8c65da6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

arch/arm/mm/pgd.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
#define __pgd_alloc() kmalloc(PTRS_PER_PGD * sizeof(pgd_t), GFP_KERNEL)
2424
#define __pgd_free(pgd) kfree(pgd)
2525
#else
26-
#define __pgd_alloc() (pgd_t *)__get_free_pages(GFP_KERNEL, 2)
26+
#define __pgd_alloc() (pgd_t *)__get_free_pages(GFP_KERNEL | __GFP_REPEAT, 2)
2727
#define __pgd_free(pgd) free_pages((unsigned long)pgd, 2)
2828
#endif
2929

0 commit comments

Comments
 (0)