diff mbox series

[v4,12/19] net/ena: terminate devargs allowed keys with null

Message ID 20210511064554.10656-13-mk@semihalf.com (mailing list archive)
State Accepted, archived
Delegated to: Ferruh Yigit
Headers show
Series net/ena: update ENA PMD to v2.3.0 | expand


Context Check Description
ci/checkpatch success coding style OK

Commit Message

Michal Krawczyk May 11, 2021, 6:45 a.m. UTC
As the documentation of rte_kvargs_parse() states, the valid_keys
argument must be NULL terminated. Lack of this feature may cause
segmentation fault if the passed devarg will be different then the
supported value.

Fixes: 8a7a73f26cc9 ("net/ena: support large LLQ headers")
Cc: stable@dpdk.org

Signed-off-by: Michal Krawczyk <mk@semihalf.com>
Reviewed-by: Igor Chauskin <igorch@amazon.com>
Reviewed-by: Shay Agroskin <shayagr@amazon.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
* Fix commit heading style.

 drivers/net/ena/ena_ethdev.c | 1 +
 1 file changed, 1 insertion(+)
diff mbox series


diff --git a/drivers/net/ena/ena_ethdev.c b/drivers/net/ena/ena_ethdev.c
index cb8ad5c3d0..6092288239 100644
--- a/drivers/net/ena/ena_ethdev.c
+++ b/drivers/net/ena/ena_ethdev.c
@@ -2876,6 +2876,7 @@  static int ena_parse_devargs(struct ena_adapter *adapter,
 	static const char * const allowed_args[] = {
+		NULL,
 	struct rte_kvargs *kvlist;
 	int rc;