cryptodev-linux: update to 1.13
[openwrt/staging/mans0n.git] / package / kernel / cryptodev-linux / patches / 0001-zero-copy-fix-build-for-linux-6.4.patch
1 From 592017c3a910a3905b1925aee88c4674e9a596b7 Mon Sep 17 00:00:00 2001
2 From: Gaurav Jain <gaurav.jain@nxp.com>
3 Date: Tue, 30 May 2023 17:09:42 +0530
4 Subject: [PATCH] zero copy: Fix build for Linux 6.4
5
6 get_user_pages_remote api prototype is changed in kernel.
7 struct vm_area_struct **vmas argument is removed.
8 Migrate to the new API.
9
10 Signed-off-by: Gaurav Jain <gaurav.jain@nxp.com>
11 ---
12 zc.c | 6 +++++-
13 1 file changed, 5 insertions(+), 1 deletion(-)
14
15 diff --git a/zc.c b/zc.c
16 index fdf7da17..6637945a 100644
17 --- a/zc.c
18 +++ b/zc.c
19 @@ -80,10 +80,14 @@ int __get_userbuf(uint8_t __user *addr, uint32_t len, int write,
20 ret = get_user_pages_remote(task, mm,
21 (unsigned long)addr, pgcount, write ? FOLL_WRITE : 0,
22 pg, NULL, NULL);
23 -#else
24 +#elif (LINUX_VERSION_CODE < KERNEL_VERSION(6, 4, 0))
25 ret = get_user_pages_remote(mm,
26 (unsigned long)addr, pgcount, write ? FOLL_WRITE : 0,
27 pg, NULL, NULL);
28 +#else
29 + ret = get_user_pages_remote(mm,
30 + (unsigned long)addr, pgcount, write ? FOLL_WRITE : 0,
31 + pg, NULL);
32 #endif
33 #if (LINUX_VERSION_CODE < KERNEL_VERSION(5, 8, 0))
34 up_read(&mm->mmap_sem);