summaryrefslogtreecommitdiffstats
path: root/recipes-kernel/cryptodev/sdk_patches/0090-Adjust-to-recent-user-page-API-changes.patch
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-kernel/cryptodev/sdk_patches/0090-Adjust-to-recent-user-page-API-changes.patch')
-rw-r--r--recipes-kernel/cryptodev/sdk_patches/0090-Adjust-to-recent-user-page-API-changes.patch55
1 files changed, 0 insertions, 55 deletions
diff --git a/recipes-kernel/cryptodev/sdk_patches/0090-Adjust-to-recent-user-page-API-changes.patch b/recipes-kernel/cryptodev/sdk_patches/0090-Adjust-to-recent-user-page-API-changes.patch
deleted file mode 100644
index 95959299..00000000
--- a/recipes-kernel/cryptodev/sdk_patches/0090-Adjust-to-recent-user-page-API-changes.patch
+++ /dev/null
@@ -1,55 +0,0 @@
1From d40bcfdfb2c2c5aa4c47b5653fdea3ee317d234b Mon Sep 17 00:00:00 2001
2From: Michael Weiser <michael.weiser@gmx.de>
3Date: Fri, 5 Aug 2016 18:43:55 +0200
4Subject: [PATCH 090/104] Adjust to recent user page API changes
5
64.6.0 basically renamed get_user_pages() to get_user_pages_remote() and
7introduced a new get_user_pages() that always works on the current
8task.[1] Distinguish the two APIs based on kernel version we're
9compiling for.
10
11Also, there seems to have been a massive cleansing of
12page_cache_release(page) in favour of put_page(page)[2] which was an
13alias for put_page(page)[3] since 2.6.0. Before that beginning with
142.4.0 both page_cache_release(page) and put_page(page) have been aliases
15for __free_page(page). So using put_page() instead of
16page_cache_release(page) will produce identical code for anything after
172.4.0.
18
19[1] https://lkml.org/lkml/2016/2/10/555
20[2] https://www.spinics.net/lists/linux-fsdevel/msg95923.html
21[3] https://www.spinics.net/lists/linux-fsdevel/msg95922.html
22---
23 zc.c | 9 +++++++--
24 1 file changed, 7 insertions(+), 2 deletions(-)
25
26diff --git a/zc.c b/zc.c
27index 29b0501..a97b49f 100644
28--- a/zc.c
29+++ b/zc.c
30@@ -59,7 +59,12 @@ int __get_userbuf(uint8_t __user *addr, uint32_t len, int write,
31 }
32
33 down_read(&mm->mmap_sem);
34- ret = get_user_pages(task, mm,
35+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 6, 0))
36+ ret = get_user_pages_remote(
37+#else
38+ ret = get_user_pages(
39+#endif
40+ task, mm,
41 (unsigned long)addr, pgcount, write, 0, pg, NULL);
42 up_read(&mm->mmap_sem);
43 if (ret != pgcount)
44@@ -119,7 +124,7 @@ void release_user_pages(struct csession *ses)
45 else
46 ses->readonly_pages--;
47
48- page_cache_release(ses->pages[i]);
49+ put_page(ses->pages[i]);
50 }
51 ses->used_pages = 0;
52 }
53--
542.10.2
55