mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 10:41:38 -04:00
kexec: allocate the kexec control page with KEXEC_CONTROL_MEMORY_GFP
Introduce KEXEC_CONTROL_MEMORY_GFP to allow the architecture code to override the gfp flags of the allocation for the kexec control page. The loop in kimage_alloc_normal_control_pages allocates pages with GFP_KERNEL until a page is found that happens to have an address smaller than the KEXEC_CONTROL_MEMORY_LIMIT. On systems with a large memory size but a small KEXEC_CONTROL_MEMORY_LIMIT the loop will keep allocating memory until the oom killer steps in. Signed-off-by: Martin Schwidefsky <[email protected]>
This commit is contained in:
parent
27cf3a16b2
commit
7e01b5acd8
3 changed files with 8 additions and 1 deletions
|
|
@ -707,7 +707,7 @@ static struct page *kimage_alloc_normal_control_pages(struct kimage *image,
|
|||
do {
|
||||
unsigned long pfn, epfn, addr, eaddr;
|
||||
|
||||
pages = kimage_alloc_pages(GFP_KERNEL, order);
|
||||
pages = kimage_alloc_pages(KEXEC_CONTROL_MEMORY_GFP, order);
|
||||
if (!pages)
|
||||
break;
|
||||
pfn = page_to_pfn(pages);
|
||||
|
|
|
|||
Loading…
Reference in a new issue