diff options
author | Rains | 2017-03-01 11:14:43 +0800 |
---|---|---|
committer | Rains | 2017-03-01 11:14:43 +0800 |
commit | 26132fd04f480258b12357a14cc6f5dda14ada65 (patch) | |
tree | 911ad20a7d02f83e5721737f0af1d0a8f5f6f33a /vmmon-12.5.2-4.9.patch | |
parent | 0f9b3431098f822d6d8111a76beadd99af1f5427 (diff) | |
download | aur-26132fd04f480258b12357a14cc6f5dda14ada65.tar.gz |
add linux 4.9 & 4.10 support
Diffstat (limited to 'vmmon-12.5.2-4.9.patch')
-rw-r--r-- | vmmon-12.5.2-4.9.patch | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/vmmon-12.5.2-4.9.patch b/vmmon-12.5.2-4.9.patch new file mode 100644 index 000000000000..f0761e25d328 --- /dev/null +++ b/vmmon-12.5.2-4.9.patch @@ -0,0 +1,21 @@ +diff --git vmmon-only/linux/hostif.c vmmon-only/linux/hostif.c +index 7053a83..614e181 100644 +--- vmmon-only/linux/hostif.c ++++ vmmon-only/linux/hostif.c +@@ -1162,12 +1162,16 @@ HostIFGetUserPages(void *uvAddr, // IN + int retval; + + down_read(¤t->mm->mmap_sem); ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 9, 0) ++ retval = get_user_pages((unsigned long)uvAddr, numPages, 0, ppages, NULL); ++#else + #if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 6, 0) + retval = get_user_pages((unsigned long)uvAddr, numPages, 0, 0, ppages, NULL); + #else + retval = get_user_pages(current, current->mm, (unsigned long)uvAddr, + numPages, 0, 0, ppages, NULL); + #endif ++#endif + up_read(¤t->mm->mmap_sem); + + return retval != numPages; |