summarylogtreecommitdiffstats
path: root/vmnet-12.5.2-4.9.patch
diff options
context:
space:
mode:
Diffstat (limited to 'vmnet-12.5.2-4.9.patch')
-rw-r--r--vmnet-12.5.2-4.9.patch21
1 files changed, 21 insertions, 0 deletions
diff --git a/vmnet-12.5.2-4.9.patch b/vmnet-12.5.2-4.9.patch
new file mode 100644
index 000000000000..c1b9569f1fb0
--- /dev/null
+++ b/vmnet-12.5.2-4.9.patch
@@ -0,0 +1,21 @@
+diff --git vmnet-only/userif.c vmnet-only/userif.c
+index 2b976d7..f157f68 100644
+--- vmnet-only/userif.c
++++ vmnet-only/userif.c
+@@ -113,12 +113,16 @@ UserifLockPage(VA addr) // IN
+ int retval;
+
+ down_read(&current->mm->mmap_sem);
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 9, 0)
++ retval = get_user_pages(addr, 1, 0, &page, NULL);
++#else
+ #if 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,
+ 1, 1, 0, &page, NULL);
+ #endif
++#endif
+ up_read(&current->mm->mmap_sem);
+
+ if (retval != 1) {