From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id AB0DAA0524 for ; Thu, 4 Feb 2021 12:35:27 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id A0597240754; Thu, 4 Feb 2021 12:35:27 +0100 (CET) Received: from youngberry.canonical.com (youngberry.canonical.com [91.189.89.112]) by mails.dpdk.org (Postfix) with ESMTP id 807E124074D for ; Thu, 4 Feb 2021 12:35:26 +0100 (CET) Received: from 2.general.paelzer.uk.vpn ([10.172.196.173] helo=localhost.localdomain) by youngberry.canonical.com with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1l7cv0-0005Oj-BM; Thu, 04 Feb 2021 11:35:26 +0000 From: Christian Ehrhardt To: Anatoly Burakov Cc: Zhihong Peng , dpdk stable Date: Thu, 4 Feb 2021 12:28:23 +0100 Message-Id: <20210204112954.2488123-48-christian.ehrhardt@canonical.com> X-Mailer: git-send-email 2.30.0 In-Reply-To: <20210204112954.2488123-1-christian.ehrhardt@canonical.com> References: <20210204112954.2488123-1-christian.ehrhardt@canonical.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-stable] patch 'fbarray: fix overlap check' has been queued to stable release 19.11.7 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" 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 --- >From f5e732ef31ff37e43c69ff515875a0e628bd499f Mon Sep 17 00:00:00 2001 From: Anatoly Burakov 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 Tested-by: Zhihong Peng --- 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@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)