[13/22] net/ena: terminate devargs allowed keys with NULL

Message ID 20210430125725.28796-14-mk@semihalf.com (mailing list archive)
State Superseded, archived
Delegated to: Ferruh Yigit
Series net/ena: update ENA PMD to v2.3.0 |


Context Check Description
ci/checkpatch success coding style OK

Commit Message

Michal Krawczyk April 30, 2021, 12:57 p.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>
 drivers/net/ena/ena_ethdev.c | 1 +
 1 file changed, 1 insertion(+)


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;