diff mbox series

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

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

Checks

Context Check Description
ci/checkpatch success coding style OK

Commit Message

Michal Krawczyk May 6, 2021, 2:25 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(+)

Comments

Ferruh Yigit May 7, 2021, 4:47 p.m. UTC | #1
On 5/6/2021 3:25 PM, Michal Krawczyk wrote:
> 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[] = {
>  		ENA_DEVARG_LARGE_LLQ_HDR,
> +		NULL,
>  	};
>  	struct rte_kvargs *kvlist;
>  	int rc;
> 

Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>make sen
diff mbox series

Patch

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[] = {
 		ENA_DEVARG_LARGE_LLQ_HDR,
+		NULL,
 	};
 	struct rte_kvargs *kvlist;
 	int rc;