From dafa42cadc86b5fa25faf033a116ea77b6698391 Mon Sep 17 00:00:00 2001 From: kingforaday Date: Sun, 19 Jul 2020 22:08:03 +0000 Subject: [PATCH] Fix for change in Kernel 4.4.168 --- zc.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/zc.c b/zc.c index 2c286bb..a560db5 100644 --- a/zc.c +++ b/zc.c @@ -63,9 +63,12 @@ int __get_userbuf(uint8_t __user *addr, uint32_t len, int write, #else mmap_read_lock(mm); #endif -#if (LINUX_VERSION_CODE < KERNEL_VERSION(4, 6, 0)) +#if (LINUX_VERSION_CODE < KERNEL_VERSION(4, 4, 168)) ret = get_user_pages(task, mm, (unsigned long)addr, pgcount, write, 0, pg, NULL); +#elif (LINUX_VERSION_CODE < KERNEL_VERSION(4, 6, 0)) + ret = get_user_pages(task, mm, + (unsigned long)addr, pgcount, write, pg, NULL); #elif (LINUX_VERSION_CODE < KERNEL_VERSION(4, 9, 0)) ret = get_user_pages_remote(task, mm, (unsigned long)addr, pgcount, write, 0, pg, NULL);