diff options
Diffstat (limited to 'meta/recipes-kernel/cryptodev/files/0001-Adjust-to-another-change-in-the-user-page-API.patch')
-rw-r--r-- | meta/recipes-kernel/cryptodev/files/0001-Adjust-to-another-change-in-the-user-page-API.patch | 40 |
1 files changed, 0 insertions, 40 deletions
diff --git a/meta/recipes-kernel/cryptodev/files/0001-Adjust-to-another-change-in-the-user-page-API.patch b/meta/recipes-kernel/cryptodev/files/0001-Adjust-to-another-change-in-the-user-page-API.patch deleted file mode 100644 index fb75278b5e..0000000000 --- a/meta/recipes-kernel/cryptodev/files/0001-Adjust-to-another-change-in-the-user-page-API.patch +++ /dev/null | |||
@@ -1,40 +0,0 @@ | |||
1 | From f126e4837e6334d0464540995df7426fedf6b175 Mon Sep 17 00:00:00 2001 | ||
2 | From: Michael Weiser <michael.weiser@gmx.de> | ||
3 | Date: Fri, 11 Nov 2016 18:09:32 +0100 | ||
4 | Subject: [PATCH] Adjust to another change in the user page API | ||
5 | |||
6 | 4.9.0 will replace the write and force flags of get_user_pages_remote() | ||
7 | with a gup_flags parameter[1]. Distinguish the two APIs based on kernel | ||
8 | version we're compiling for. | ||
9 | |||
10 | [1] https://github.com/torvalds/linux/commit/9beae1ea89305a9667ceaab6d0bf46a045ad71e7 | ||
11 | |||
12 | Upstream-Status: Backport | ||
13 | |||
14 | Signed-off-by: Daniel Schultz <d.schultz@phytec.de> | ||
15 | --- | ||
16 | zc.c | 8 +++++++- | ||
17 | 1 file changed, 7 insertions(+), 1 deletion(-) | ||
18 | |||
19 | diff --git a/zc.c b/zc.c | ||
20 | index a97b49f..e766ee3 100644 | ||
21 | --- a/zc.c | ||
22 | +++ b/zc.c | ||
23 | @@ -65,7 +65,13 @@ int __get_userbuf(uint8_t __user *addr, uint32_t len, int write, | ||
24 | ret = get_user_pages( | ||
25 | #endif | ||
26 | task, mm, | ||
27 | - (unsigned long)addr, pgcount, write, 0, pg, NULL); | ||
28 | + (unsigned long)addr, pgcount, | ||
29 | +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 9, 0)) | ||
30 | + write ? FOLL_WRITE : 0, | ||
31 | +#else | ||
32 | + write, 0, | ||
33 | +#endif | ||
34 | + pg, NULL); | ||
35 | up_read(&mm->mmap_sem); | ||
36 | if (ret != pgcount) | ||
37 | return -EINVAL; | ||
38 | -- | ||
39 | 1.9.1 | ||
40 | |||