From fce5c936e5b2ae074907ece44a43d593bd4e47b1 Mon Sep 17 00:00:00 2001 From: Jaehoon Chung Date: Tue, 22 Jan 2019 13:26:04 +0900 Subject: fix build error about get_user_pages() Fix build error since changing the arguments of get_user_pages(). Signed-off-by: Jaehoon Chung --- drivers/gator/gator_cookies.c | 4 ++-- drivers/gud/MobiCoreDriver/mmu.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/gator/gator_cookies.c b/drivers/gator/gator_cookies.c index cce942043296..2c389f6b3843 100644 --- a/drivers/gator/gator_cookies.c +++ b/drivers/gator/gator_cookies.c @@ -13,7 +13,7 @@ /* Kernel version 4.6.0 removes get_user_pages macro. We should use get_user_pages_remote anyway. (See https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/include/linux/mm.h?id=c12d2da56d0e07d230968ee2305aaa86b93a6832) */ #if LINUX_VERSION_CODE < KERNEL_VERSION(4, 6, 0) -# define get_user_pages_remote(a,b,c,d,e,f,g,h) get_user_pages(a,b,c,d,e,f,g,h) +# define get_user_pages_remote(a,b,c,d,e,f,g) get_user_pages(a,b,c,d,e,f,g) #endif struct mount { @@ -254,7 +254,7 @@ static int translate_app_process(const char **text, int cpu, struct task_struct down_read(&mm->mmap_sem); while (len) { - if (get_user_pages_remote(task, mm, addr, 1, 0, 1, &page, &page_vma) <= 0) + if (get_user_pages_remote(task, mm, addr, 1, FOLL_FORCE, &page, &page_vma) <= 0) goto outsem; maddr = kmap(page); diff --git a/drivers/gud/MobiCoreDriver/mmu.c b/drivers/gud/MobiCoreDriver/mmu.c index 104e68f0f067..2102425a031a 100644 --- a/drivers/gud/MobiCoreDriver/mmu.c +++ b/drivers/gud/MobiCoreDriver/mmu.c @@ -348,7 +348,7 @@ struct tee_mmu *tee_mmu_create(struct mm_struct *mm, /* Buffer was allocated in user space */ down_read(&mm->mmap_sem); gup_ret = get_user_pages(NULL, mm, (uintptr_t)reader, - pages_nr, write, 0, pages, + pages_nr, write ? FOLL_WRITE : 0, pages, NULL); up_read(&mm->mmap_sem); if (gup_ret < 0) { -- cgit v1.2.3