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 8C139A0C41 for ; Mon, 12 Apr 2021 03:55:38 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 698884069D; Mon, 12 Apr 2021 03:55:38 +0200 (CEST) Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by mails.dpdk.org (Postfix) with ESMTP id 185344069D for ; Mon, 12 Apr 2021 03:55:36 +0200 (CEST) IronPort-SDR: NRSnSaM7pWEND0P4rsqy4fWWHMwSyBx4i+Xd7100pnQ/+dio3fYUWj5PLLPR08brwTZKE7yXeN kJRTMOmxfObQ== X-IronPort-AV: E=McAfee;i="6000,8403,9951"; a="190903819" X-IronPort-AV: E=Sophos;i="5.82,214,1613462400"; d="scan'208";a="190903819" Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Apr 2021 18:55:36 -0700 IronPort-SDR: D70VHwx9U+TrAmRTgjARXRs1+W0l+jYTlNuuQkVD+jI+dG8fMt5jSc3hsJbeEBpKOu6V2Z5pK4 sFkRALl6ii+w== X-IronPort-AV: E=Sophos;i="5.82,214,1613462400"; d="scan'208";a="614387990" Received: from unknown (HELO localhost.localdomain) ([10.240.183.109]) by fmsmga005-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Apr 2021 18:55:34 -0700 From: Wenwu Ma To: build_sh@intel.com Cc: alvinx.zhang@intel.com, Wenwu Ma , stable@dpdk.org Date: Mon, 12 Apr 2021 13:49:23 +0000 Message-Id: <20210412134923.258845-1-wenwux.ma@intel.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-stable] [PATCH v1] test/mempool: fix out of memory bound for mempool 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" 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@dpdk.org Signed-off-by: Wenwu Ma --- 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