[dpdk-stable] patch 'fbarray: fix overlap check' has been queued to stable release 19.11.7

Christian Ehrhardt christian.ehrhardt at canonical.com
Thu Feb 4 12:28:23 CET 2021


Hi,

FYI, your patch has been queued to stable release 19.11.7

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/06/21. 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.

Queued patches are on a temporary branch at:
https://github.com/cpaelzer/dpdk-stable-queue

This queued commit can be viewed at:
https://github.com/cpaelzer/dpdk-stable-queue/commit/f5e732ef31ff37e43c69ff515875a0e628bd499f

Thanks.

Christian Ehrhardt <christian.ehrhardt at canonical.com>

---
>From f5e732ef31ff37e43c69ff515875a0e628bd499f Mon Sep 17 00:00:00 2001
From: Anatoly Burakov <anatoly.burakov at intel.com>
Date: Thu, 14 Jan 2021 15:02:45 +0000
Subject: [PATCH] fbarray: fix overlap check

[ upstream commit 27ff8384deaca2f7727d0cedf2053aa13fbae1e2 ]

When we're attaching fbarrays in secondary processes, we check for
whether the intended memory address for the fbarray is already in use by
some other, local fbarray. However, the check for end-overlap (i.e. to
see if our memory area's end overlaps with some other fbarray) is
incorrectly counting end offset as part of the overlap. Fix the check.

Fixes: 5b61c62cfd76 ("fbarray: add internal tailq for mapped areas")

Signed-off-by: Anatoly Burakov <anatoly.burakov at intel.com>
Tested-by: Zhihong Peng <zhihongx.peng at intel.com>
---
 lib/librte_eal/common/eal_common_fbarray.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/librte_eal/common/eal_common_fbarray.c b/lib/librte_eal/common/eal_common_fbarray.c
index 4f8f1af73c..de7e772042 100644
--- a/lib/librte_eal/common/eal_common_fbarray.c
+++ b/lib/librte_eal/common/eal_common_fbarray.c
@@ -114,7 +114,7 @@ overlap(const struct mem_area *ma, const void *start, size_t len)
 	if (start >= ma_start && start < ma_end)
 		return 1;
 	/* end overlap? */
-	if (end >= ma_start && end < ma_end)
+	if (end > ma_start && end < ma_end)
 		return 1;
 	return 0;
 }
-- 
2.30.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-04 12:04:30.087337094 +0100
+++ 0048-fbarray-fix-overlap-check.patch	2021-02-04 12:04:27.962789662 +0100
@@ -1 +1 @@
-From 27ff8384deaca2f7727d0cedf2053aa13fbae1e2 Mon Sep 17 00:00:00 2001
+From f5e732ef31ff37e43c69ff515875a0e628bd499f Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 27ff8384deaca2f7727d0cedf2053aa13fbae1e2 ]
+
@@ -13 +14,0 @@
-Cc: stable at dpdk.org
@@ -22 +23 @@
-index 1220e2bae9..d974f3dab7 100644
+index 4f8f1af73c..de7e772042 100644
@@ -25 +26 @@
-@@ -110,7 +110,7 @@ overlap(const struct mem_area *ma, const void *start, size_t len)
+@@ -114,7 +114,7 @@ overlap(const struct mem_area *ma, const void *start, size_t len)


More information about the stable mailing list