summaryrefslogtreecommitdiff
blob: 1b8b87fd94461ab9c42b6e8e26e588a6b6f63a9e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
--- vmci-only/linux/driver.c.old	2017-05-24 01:02:34.453636688 +0200
+++ vmci-only/linux/driver.c	2017-05-24 01:04:12.757631983 +0200
@@ -1476,7 +1476,11 @@
 #else
    retval = get_user_pages(current, current->mm, addr,
 #endif
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 9, 0)
+                           1, FOLL_WRITE, &page, NULL);
+#else
                            1, 1, 0, &page, NULL);
+#endif
    up_read(&current->mm->mmap_sem);
 
    if (retval != 1) {
--- vmci-only/linux/vmciKernelIf.c.old	2017-05-24 00:58:58.837647006 +0200
+++ vmci-only/linux/vmciKernelIf.c	2017-05-24 01:02:07.668637969 +0200
@@ -2062,7 +2062,11 @@
                            (VA)produceUVA,
 #endif
                            produceQ->kernelIf->numPages,
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 9, 0)
+                           FOLL_WRITE,
+#else
                            1, 0,
+#endif
                            produceQ->kernelIf->u.h.headerPage,
                            NULL);
    if (retval < produceQ->kernelIf->numPages) {
@@ -2080,7 +2084,11 @@
                            (VA)consumeUVA,
 #endif
                            consumeQ->kernelIf->numPages,
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 9, 0)
+                           FOLL_WRITE,
+#else
                            1, 0,
+#endif
                            consumeQ->kernelIf->u.h.headerPage,
                            NULL);
    if (retval < consumeQ->kernelIf->numPages) {