--- a/userif.c 2016-12-22 14:29:43.237218623 +0100 +++ b/userif.c 2016-12-22 14:31:03.258834075 +0100 @@ -113,7 +113,9 @@ int retval; down_read(¤t->mm->mmap_sem); -#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 6, 0) +#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 9, 0) + retval = get_user_pages(addr, 1, 0, &page, NULL); +#elif LINUX_VERSION_CODE >= KERNEL_VERSION(4, 6, 0) retval = get_user_pages(addr, 1, 1, 0, &page, NULL); #else retval = get_user_pages(current, current->mm, addr,