summaryrefslogtreecommitdiffstats
path: root/meta/recipes-kernel/cryptodev/files/fix-build-for-Linux-5.11-rc1.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-kernel/cryptodev/files/fix-build-for-Linux-5.11-rc1.patch')
-rw-r--r--meta/recipes-kernel/cryptodev/files/fix-build-for-Linux-5.11-rc1.patch32
1 files changed, 32 insertions, 0 deletions
diff --git a/meta/recipes-kernel/cryptodev/files/fix-build-for-Linux-5.11-rc1.patch b/meta/recipes-kernel/cryptodev/files/fix-build-for-Linux-5.11-rc1.patch
new file mode 100644
index 0000000000..3ae77cb9d6
--- /dev/null
+++ b/meta/recipes-kernel/cryptodev/files/fix-build-for-Linux-5.11-rc1.patch
@@ -0,0 +1,32 @@
1From 55c6315058fc0dd189ffd116f2cc27ba4fa84cb6 Mon Sep 17 00:00:00 2001
2From: Joan Bruguera <joanbrugueram@gmail.com>
3Date: Mon, 28 Dec 2020 01:41:31 +0100
4Subject: [PATCH] Fix build for Linux 5.11-rc1
5
6ksys_close was removed, as far as I can tell, close_fd replaces it.
7
8See also: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=8760c909f54a82aaa6e76da19afe798a0c77c3c3
9 https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=1572bfdf21d4d50e51941498ffe0b56c2289f783
10
11Upstream-Status: Backport [https://github.com/cryptodev-linux/cryptodev-linux/commit/55c6315058fc0dd189ffd116f2cc27ba4fa84cb6]
12Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
13---
14 ioctl.c | 4 +++-
15 1 file changed, 3 insertions(+), 1 deletion(-)
16
17diff --git a/ioctl.c b/ioctl.c
18index 3d332380..95481d4f 100644
19--- a/ioctl.c
20+++ b/ioctl.c
21@@ -871,8 +871,10 @@ cryptodev_ioctl(struct file *filp, unsigned int cmd, unsigned long arg_)
22 if (unlikely(ret)) {
23 #if (LINUX_VERSION_CODE < KERNEL_VERSION(4, 17, 0))
24 sys_close(fd);
25-#else
26+#elif (LINUX_VERSION_CODE < KERNEL_VERSION(5, 11, 0))
27 ksys_close(fd);
28+#else
29+ close_fd(fd);
30 #endif
31 return ret;
32 }