From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 9DC75A04BC; Thu, 8 Oct 2020 21:42:30 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id DEB471B696; Thu, 8 Oct 2020 21:42:27 +0200 (CEST) Received: from mellanox.co.il (mail-il-dmz.mellanox.com [193.47.165.129]) by dpdk.org (Postfix) with ESMTP id 88CA21B650 for ; Thu, 8 Oct 2020 21:42:26 +0200 (CEST) Received: from Internal Mail-Server by MTLPINE1 (envelope-from haggaie@nvidia.com) with SMTP; 8 Oct 2020 22:42:24 +0300 Received: from gen-l-vrt-067.lab.mtl.com (gen-l-vrt-067.mtl.labs.mlnx [10.237.67.1]) by labmailer.mlnx (8.13.8/8.13.8) with ESMTP id 098JgOrb023223; Thu, 8 Oct 2020 22:42:24 +0300 From: Haggai Eran To: dev@dpdk.org Cc: Akhil Goyal , Haggai Eran , stable@dpdk.org, Declan Doherty Date: Thu, 8 Oct 2020 22:42:14 +0300 Message-Id: <1602186134-591-1-git-send-email-haggaie@nvidia.com> X-Mailer: git-send-email 1.8.3.1 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH] cryptodev: fix cryptodev parameter parsing X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" The rte_cryptodev_pmd_parse_input_args function crashes with a segmentation fault when passing a non-empty argument string. The function passes cryptodev_pmd_valid_params to rte_kvargs_parse, which accepts a NULL-terminated list of valid keys, yet cryptodev_pmd_valid_params does not end with NULL. The patch adds the missing NULL pointer. Fixes: 9e6edea41805 ("cryptodev: add APIs to assist PMD initialisation") Cc: stable@dpdk.org Signed-off-by: Haggai Eran --- lib/librte_cryptodev/rte_cryptodev_pmd.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/librte_cryptodev/rte_cryptodev_pmd.h b/lib/librte_cryptodev/rte_cryptodev_pmd.h index 81975d72b47a..1367222f7350 100644 --- a/lib/librte_cryptodev/rte_cryptodev_pmd.h +++ b/lib/librte_cryptodev/rte_cryptodev_pmd.h @@ -41,7 +41,8 @@ static const char * const cryptodev_pmd_valid_params[] = { RTE_CRYPTODEV_PMD_NAME_ARG, RTE_CRYPTODEV_PMD_MAX_NB_QP_ARG, - RTE_CRYPTODEV_PMD_SOCKET_ID_ARG + RTE_CRYPTODEV_PMD_SOCKET_ID_ARG, + NULL }; /** -- 1.8.3.1