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