Skip to content

Commit

Permalink
Fix for change in Kernel 4.4.168
Browse files Browse the repository at this point in the history
  • Loading branch information
kingforaday committed Jul 19, 2020
1 parent f2927e3 commit dafa42c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion zc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit dafa42c

Please sign in to comment.