Hi,

Thanks for fixing the seg fault.

Acked-by: Harman Kalra <[email protected]>

Thanks
Harman

> -----Original Message-----
> From: Chengwen Feng <[email protected]>
> Sent: Monday, March 20, 2023 2:51 PM
> To: [email protected]; [email protected]; Harman Kalra
> <[email protected]>; Santosh Shukla
> <[email protected]>; Jerin Jacob
> <[email protected]>
> Cc: [email protected]
> Subject: [EXT] [PATCH v2 25/44] net/octeontx: fix segment fault when parse
> devargs
> 
> External Email
> 
> ----------------------------------------------------------------------
> The rte_kvargs_process() was used to parse KV pairs, it also supports to
> parse 'only keys' (e.g. socket_id) type. And the callback function parameter
> 'value' is NULL when parsed 'only keys'.
> 
> This patch fixes segment fault when parse input args with 'only keys'.
> 
> Fixes: f7be70e5130e ("net/octeontx: add net device probe and remove")
> Cc: [email protected]
> 
> Signed-off-by: Chengwen Feng <[email protected]>
> ---
>  drivers/net/octeontx/octeontx_ethdev.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/drivers/net/octeontx/octeontx_ethdev.c
> b/drivers/net/octeontx/octeontx_ethdev.c
> index d52a3e73d5..d11f359c7b 100644
> --- a/drivers/net/octeontx/octeontx_ethdev.c
> +++ b/drivers/net/octeontx/octeontx_ethdev.c
> @@ -70,6 +70,9 @@ parse_integer_arg(const char *key __rte_unused,  {
>       int *i = (int *)extra_args;
> 
> +     if (value == NULL)
> +             return -EINVAL;
> +
>       *i = atoi(value);
>       if (*i < 0) {
>               octeontx_log_err("argument has to be positive.");
> --
> 2.17.1

Reply via email to