diff options
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; |