summaryrefslogtreecommitdiff
path: root/kernel
diff options
context:
space:
mode:
authorMartin Schwidefsky <schwidefsky@de.ibm.com>2015-04-16 14:47:33 +0200
committerJiri Slaby <jslaby@suse.cz>2015-08-04 16:51:58 +0200
commit6c1ad037a144bb56db6e70b00a4108ce7ff7c950 (patch)
treed80651feedca13d94f5ddf98ccbb5cbaae6b864f /kernel
parentcbe04187a6cac63ce4c6277b9759d370de68cb00 (diff)
kexec: allocate the kexec control page with KEXEC_CONTROL_MEMORY_GFP
commit 7e01b5acd88b3f3108d8c4ce44e3205d67437202 upstream. 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 <schwidefsky@de.ibm.com> Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Diffstat (limited to 'kernel')
-rw-r--r--kernel/kexec.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/kexec.c b/kernel/kexec.c
index 4c9dcffd1750..316216c38fb9 100644
--- a/kernel/kexec.c
+++ b/kernel/kexec.c
@@ -432,7 +432,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);