summaryrefslogtreecommitdiffstats
path: root/meta/recipes-kernel/cryptodev/files/06d6b560c6e45dc317dae47c74706fa43f4a31d8.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-kernel/cryptodev/files/06d6b560c6e45dc317dae47c74706fa43f4a31d8.patch')
-rw-r--r--meta/recipes-kernel/cryptodev/files/06d6b560c6e45dc317dae47c74706fa43f4a31d8.patch54
1 files changed, 0 insertions, 54 deletions
diff --git a/meta/recipes-kernel/cryptodev/files/06d6b560c6e45dc317dae47c74706fa43f4a31d8.patch b/meta/recipes-kernel/cryptodev/files/06d6b560c6e45dc317dae47c74706fa43f4a31d8.patch
deleted file mode 100644
index cb556e1e24..0000000000
--- a/meta/recipes-kernel/cryptodev/files/06d6b560c6e45dc317dae47c74706fa43f4a31d8.patch
+++ /dev/null
@@ -1,54 +0,0 @@
1From f14b4706b0d04988e7e5bc8c4d2aefef9f029d9d 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] 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
26Upstream-Status: Backport [from master for 4.8 kernels]
27
28Index: cryptodev-linux-1.8/zc.c
29===================================================================
30--- cryptodev-linux-1.8.orig/zc.c
31+++ cryptodev-linux-1.8/zc.c
32@@ -59,7 +59,12 @@ int __get_userbuf(uint8_t __user *addr,
33 }
34
35 down_read(&mm->mmap_sem);
36- ret = get_user_pages(task, mm,
37+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 6, 0))
38+ ret = get_user_pages_remote(
39+#else
40+ ret = get_user_pages(
41+#endif
42+ task, mm,
43 (unsigned long)addr, pgcount, write, 0, pg, NULL);
44 up_read(&mm->mmap_sem);
45 if (ret != pgcount)
46@@ -119,7 +124,7 @@ void release_user_pages(struct csession
47 else
48 ses->readonly_pages--;
49
50- page_cache_release(ses->pages[i]);
51+ put_page(ses->pages[i]);
52 }
53 ses->used_pages = 0;
54 }