[dpdk-stable] [PATCH v1] test/mempool: fix out of memory bound for mempool
Wenwu Ma
wenwux.ma at intel.com
Mon Apr 12 15:49:23 CEST 2021
Not enough memory be allocated for mempool which
cause out of bound memory access when get its private member.
Fixes: 923ceaeac140 ("test/mempool: add unit test cases")
Cc: stable at dpdk.org
Signed-off-by: Wenwu Ma <wenwux.ma at intel.com>
---
v1:
* Refine commit log.
app/test/test_mempool.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/app/test/test_mempool.c b/app/test/test_mempool.c
index 084842fda..fc06a9c6f 100644
--- a/app/test/test_mempool.c
+++ b/app/test/test_mempool.c
@@ -543,7 +543,8 @@ test_mempool(void)
mp_stack_mempool_iter = rte_mempool_create("test_iter_obj",
MEMPOOL_SIZE,
MEMPOOL_ELT_SIZE,
- RTE_MEMPOOL_CACHE_MAX_SIZE, 0,
+ RTE_MEMPOOL_CACHE_MAX_SIZE,
+ sizeof(struct rte_pktmbuf_pool_private),
NULL, NULL,
my_obj_init, NULL,
SOCKET_ID_ANY, 0);
--
2.25.1
More information about the stable
mailing list