[dpdk-stable] patch 'malloc: fix memory element size in case of padding' has been queued to LTS release 18.11.6

Kevin Traynor ktraynor at redhat.com
Wed Dec 11 22:26:50 CET 2019


Hi,

FYI, your patch has been queued to LTS release 18.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 12/17/19. 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/kevintraynor/dpdk-stable-queue

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable-queue/commit/9fd62944eacc0ea34d7b60300f9e891c4a6f7359

Thanks.

Kevin.

---
>From 9fd62944eacc0ea34d7b60300f9e891c4a6f7359 Mon Sep 17 00:00:00 2001
From: Xueming Li <xuemingl at mellanox.com>
Date: Thu, 21 Nov 2019 14:25:02 +0000
Subject: [PATCH] malloc: fix memory element size in case of padding

[ upstream commit 2808a12cc05375e986ee1c9bb956bad8288c2b5a ]

This patch fixes wrong inner memory element size when joining two
elements.

Fixes: af75078fece3 ("first public release")

Signed-off-by: Xueming Li <xuemingl at mellanox.com>
Reviewed-by: Anatoly Burakov <anatoly.burakov at intel.com>
---
 lib/librte_eal/common/malloc_elem.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/lib/librte_eal/common/malloc_elem.c b/lib/librte_eal/common/malloc_elem.c
index c92dc0ab6..24e1eb55f 100644
--- a/lib/librte_eal/common/malloc_elem.c
+++ b/lib/librte_eal/common/malloc_elem.c
@@ -469,4 +469,8 @@ join_elem(struct malloc_elem *elem1, struct malloc_elem *elem2)
 		elem1->heap->last = elem1;
 	elem1->next = next;
+	if (elem1->pad) {
+		struct malloc_elem *inner = RTE_PTR_ADD(elem1, elem1->pad);
+		inner->size = elem1->size - elem1->pad;
+	}
 }
 
-- 
2.21.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-12-11 21:24:17.261086342 +0000
+++ 0058-malloc-fix-memory-element-size-in-case-of-padding.patch	2019-12-11 21:24:12.722650081 +0000
@@ -1 +1 @@
-From 2808a12cc05375e986ee1c9bb956bad8288c2b5a Mon Sep 17 00:00:00 2001
+From 9fd62944eacc0ea34d7b60300f9e891c4a6f7359 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 2808a12cc05375e986ee1c9bb956bad8288c2b5a ]
+
@@ -10 +11,0 @@
-Cc: stable at dpdk.org
@@ -19 +20 @@
-index afacb1813..885d00424 100644
+index c92dc0ab6..24e1eb55f 100644
@@ -22 +23 @@
-@@ -488,4 +488,8 @@ join_elem(struct malloc_elem *elem1, struct malloc_elem *elem2)
+@@ -469,4 +469,8 @@ join_elem(struct malloc_elem *elem1, struct malloc_elem *elem2)



More information about the stable mailing list