git.droids-corp.org
/
dpdk.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
694fd2c
)
malloc: fix memory element size in case of padding
author
Xueming Li
<xuemingl@mellanox.com>
Thu, 21 Nov 2019 14:25:02 +0000
(14:25 +0000)
committer
Thomas Monjalon
<thomas@monjalon.net>
Tue, 26 Nov 2019 15:24:08 +0000
(16:24 +0100)
This patch fixes wrong inner memory element size when joining two
elements.
Fixes:
af75078fece3
("first public release")
Cc: stable@dpdk.org
Signed-off-by: Xueming Li <xuemingl@mellanox.com>
Reviewed-by: Anatoly Burakov <anatoly.burakov@intel.com>
lib/librte_eal/common/malloc_elem.c
patch
|
blob
|
history
diff --git
a/lib/librte_eal/common/malloc_elem.c
b/lib/librte_eal/common/malloc_elem.c
index
afacb18
..
885d004
100644
(file)
--- a/
lib/librte_eal/common/malloc_elem.c
+++ b/
lib/librte_eal/common/malloc_elem.c
@@
-487,6
+487,10
@@
join_elem(struct malloc_elem *elem1, struct malloc_elem *elem2)
else
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;
+ }
}
struct malloc_elem *