[CRIU] [PATCH 5/6] Replace PAGE_SIZE in args_len

Christopher Covington cov at codeaurora.org
Mon Oct 6 11:50:17 PDT 2014


This fixes the first instance of the following error for AArch64
kernels with CONFIG_ARM64_64K_PAGES=y.

Error (rst-malloc.c:194): Can't mremap rst mem: Invalid argument

Signed-off-by: Christopher Covington <cov at codeaurora.org>
---
 cr-restore.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/cr-restore.c b/cr-restore.c
index ac02ef8..be05fb6 100644
--- a/cr-restore.c
+++ b/cr-restore.c
@@ -2578,7 +2578,7 @@ static int sigreturn_restore(pid_t pid, CoreEntry *core)
 	BUILD_BUG_ON(sizeof(struct task_restore_args) & 1);
 	BUILD_BUG_ON(sizeof(struct thread_restore_args) & 1);
 
-	args_len = round_up(sizeof(*task_args) + sizeof(*thread_args) * current->nr_threads, PAGE_SIZE);
+	args_len = page_align(sizeof(*task_args) + sizeof(*thread_args) * current->nr_threads);
 	pr_info("%d threads require %ldK of memory\n",
 			current->nr_threads, KBYTES(args_len));
 
-- 
Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
hosted by the Linux Foundation.



More information about the CRIU mailing list