[dpdk-stable] patch 'kni: fix build with Linux 5.9' has been queued to stable release 19.11.6
luca.boccassi at gmail.com
luca.boccassi at gmail.com
Wed Oct 28 11:43:37 CET 2020
Hi,
FYI, your patch has been queued to stable release 19.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 10/30/20. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Luca Boccassi
---
>From 1844e46113dfcfcfcf21cabd6737767350cb4c9c Mon Sep 17 00:00:00 2001
From: Ferruh Yigit <ferruh.yigit at intel.com>
Date: Mon, 17 Aug 2020 11:32:47 +0100
Subject: [PATCH] kni: fix build with Linux 5.9
[ upstream commit 87efaea6376c8ae1a69e471450744a973995726b ]
Starting from Linux 5.9 'get_user_pages_remote()' API doesn't get
'struct task_struct' parameter:
commit 64019a2e467a ("mm/gup: remove task_struct pointer for all gup code")
The change reflected to the KNI with version check.
Signed-off-by: Ferruh Yigit <ferruh.yigit at intel.com>
---
kernel/linux/kni/compat.h | 4 ++++
kernel/linux/kni/kni_dev.h | 5 +++++
2 files changed, 9 insertions(+)
diff --git a/kernel/linux/kni/compat.h b/kernel/linux/kni/compat.h
index 9ee45dbf6f..d515b27669 100644
--- a/kernel/linux/kni/compat.h
+++ b/kernel/linux/kni/compat.h
@@ -134,3 +134,7 @@
#if KERNEL_VERSION(5, 6, 0) <= LINUX_VERSION_CODE
#define HAVE_TX_TIMEOUT_TXQUEUE
#endif
+
+#if KERNEL_VERSION(5, 9, 0) > LINUX_VERSION_CODE
+#define HAVE_TSK_IN_GUP
+#endif
diff --git a/kernel/linux/kni/kni_dev.h b/kernel/linux/kni/kni_dev.h
index ca5f92a47b..c15da311ba 100644
--- a/kernel/linux/kni/kni_dev.h
+++ b/kernel/linux/kni/kni_dev.h
@@ -101,8 +101,13 @@ static inline phys_addr_t iova_to_phys(struct task_struct *tsk,
offset = iova & (PAGE_SIZE - 1);
/* Read one page struct info */
+#ifdef HAVE_TSK_IN_GUP
ret = get_user_pages_remote(tsk, tsk->mm, iova, 1,
FOLL_TOUCH, &page, NULL, NULL);
+#else
+ ret = get_user_pages_remote(tsk->mm, iova, 1,
+ FOLL_TOUCH, &page, NULL, NULL);
+#endif
if (ret < 0)
return 0;
--
2.20.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2020-10-28 10:35:13.583373119 +0000
+++ 0058-kni-fix-build-with-Linux-5.9.patch 2020-10-28 10:35:11.524830318 +0000
@@ -1,16 +1,16 @@
-From 87efaea6376c8ae1a69e471450744a973995726b Mon Sep 17 00:00:00 2001
+From 1844e46113dfcfcfcf21cabd6737767350cb4c9c Mon Sep 17 00:00:00 2001
From: Ferruh Yigit <ferruh.yigit at intel.com>
Date: Mon, 17 Aug 2020 11:32:47 +0100
Subject: [PATCH] kni: fix build with Linux 5.9
+[ upstream commit 87efaea6376c8ae1a69e471450744a973995726b ]
+
Starting from Linux 5.9 'get_user_pages_remote()' API doesn't get
'struct task_struct' parameter:
commit 64019a2e467a ("mm/gup: remove task_struct pointer for all gup code")
The change reflected to the KNI with version check.
-Cc: stable at dpdk.org
-
Signed-off-by: Ferruh Yigit <ferruh.yigit at intel.com>
---
kernel/linux/kni/compat.h | 4 ++++
More information about the stable
mailing list