summaryrefslogtreecommitdiffstats
path: root/meta/recipes-kernel/cryptodev/files/0001-Fix-build-for-Linux-5.9-rc1.patch
blob: cf1c04df9e34ef95af4762be073cdfc83f9c7ccc (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
41
42
From 2f5e08aebf9229599aae7f25db752f74221cd71d Mon Sep 17 00:00:00 2001
From: Joan Bruguera <joanbrugueram@gmail.com>
Date: Fri, 14 Aug 2020 00:13:38 +0200
Subject: [PATCH] Fix build for Linux 5.9-rc1

See also: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=64019a2e467a288a16b65ab55ddcbf58c1b00187
          https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=bce617edecada007aee8610fbe2c14d10b8de2f6
          https://lore.kernel.org/lkml/CAHk-=wj_V2Tps2QrMn20_W0OJF9xqNh52XSGA42s-ZJ8Y+GyKw@mail.gmail.com/

Signed-off-by: Joan Bruguera <joanbrugueram@gmail.com>

Upstream-Status: Backport [https://github.com/cryptodev-linux/cryptodev-linux/commit/2f5e08aebf9229599aae7f25db752f74221cd71d]

Signed-off-by: Naveen Saini <naveen.kumar.saini@intel.com>

---
 zc.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/zc.c b/zc.c
index a560db5..fdf7da1 100644
--- a/zc.c
+++ b/zc.c
@@ -76,10 +76,14 @@ int __get_userbuf(uint8_t __user *addr, uint32_t len, int write,
 	ret = get_user_pages_remote(task, mm,
 			(unsigned long)addr, pgcount, write ? FOLL_WRITE : 0,
 			pg, NULL);
-#else
+#elif (LINUX_VERSION_CODE < KERNEL_VERSION(5, 9, 0))
 	ret = get_user_pages_remote(task, mm,
 			(unsigned long)addr, pgcount, write ? FOLL_WRITE : 0,
 			pg, NULL, NULL);
+#else
+	ret = get_user_pages_remote(mm,
+			(unsigned long)addr, pgcount, write ? FOLL_WRITE : 0,
+			pg, NULL, NULL);
 #endif
 #if (LINUX_VERSION_CODE < KERNEL_VERSION(5, 8, 0))
 	up_read(&mm->mmap_sem);
-- 
2.17.1