From: Haggai Eran Date: Thu, 8 Oct 2020 19:42:14 +0000 (+0300) Subject: cryptodev: fix parameter parsing X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=784fb396f72d98070f3afaf309a7addb4c0d8da1;p=dpdk.git cryptodev: fix parameter parsing 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 Acked-by: Akhil Goyal --- diff --git a/lib/librte_cryptodev/rte_cryptodev_pmd.h b/lib/librte_cryptodev/rte_cryptodev_pmd.h index 81975d72b4..1367222f73 100644 --- a/lib/librte_cryptodev/rte_cryptodev_pmd.h +++ b/lib/librte_cryptodev/rte_cryptodev_pmd.h @@ -41,7 +41,8 @@ extern "C" { 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 }; /**