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 B8939A0C42 for ; Mon, 12 Apr 2021 04:16:25 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id A4C6A4069D; Mon, 12 Apr 2021 04:16:25 +0200 (CEST) Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by mails.dpdk.org (Postfix) with ESMTP id 9F9684069D for ; Mon, 12 Apr 2021 04:16:23 +0200 (CEST) IronPort-SDR: uk9rtS1fMZaM3NQSYKmf5OJ6LdaaJzYd/CBmQhfAqzymCbHhBMOMu8wpVT3gyyFwJQGjAbREEG x8zgRMBvfryg== X-IronPort-AV: E=McAfee;i="6000,8403,9951"; a="255417634" X-IronPort-AV: E=Sophos;i="5.82,214,1613462400"; d="scan'208";a="255417634" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Apr 2021 19:16:17 -0700 IronPort-SDR: zFgM1eLlcfPNu97JjUxleGAr6EbHdE7ExGnMJ6pxdd59F3KWsFnU0rVCbeaBgYy4/Iw5YanxAC YXbKzU7ledlw== X-IronPort-AV: E=Sophos;i="5.82,214,1613462400"; d="scan'208";a="417168152" Received: from unknown (HELO localhost.localdomain) ([10.240.183.109]) by fmsmga008-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Apr 2021 19:16:16 -0700 From: Wenwu Ma To: build_sh@intel.com Cc: Wenwu Ma , stable@dpdk.org Date: Mon, 12 Apr 2021 14:10:04 +0000 Message-Id: <20210412141004.258957-1-wenwux.ma@intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210331210557.4919-1-wenwux.ma@intel.com> References: <20210331210557.4919-1-wenwux.ma@intel.com> 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