patches for DPDK stable branches
 help / color / mirror / Atom feed
From: Ori Kam <orika@nvidia.com>
To: Michael Baum <michaelba@nvidia.com>, "dev@dpdk.org" <dev@dpdk.org>
Cc: Matan Azrad <matan@nvidia.com>,
	NBU-Contact-Thomas Monjalon <thomas@monjalon.net>,
	"stable@dpdk.org" <stable@dpdk.org>
Subject: Re: [dpdk-stable] [PATCH] regex/mlx5: fix RegEx probing error flow
Date: Wed, 1 Sep 2021 08:11:05 +0000	[thread overview]
Message-ID: <DM8PR12MB540072078E930481BF1763B0D6CD9@DM8PR12MB5400.namprd12.prod.outlook.com> (raw)
In-Reply-To: <20210831203838.3411249-1-michaelba@nvidia.com>



> -----Original Message-----
> From: Michael Baum <michaelba@nvidia.com>
> 
> In RegEx device probing, there is register read trying after context device
> creation.
> 
> When the reading fails, the context device was not freed what caused a
> memory leak.
> 
> Free it.
> 
> Fixes: f324162e8e77 ("regex/mlx5: support combined rule file")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Michael Baum <michaelba@nvidia.com>
> ---
>  drivers/regex/mlx5/mlx5_regex.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/regex/mlx5/mlx5_regex.c
> b/drivers/regex/mlx5/mlx5_regex.c index f17b6df47f..8866a4d0c6 100644
> --- a/drivers/regex/mlx5/mlx5_regex.c
> +++ b/drivers/regex/mlx5/mlx5_regex.c
> @@ -171,7 +171,7 @@ mlx5_regex_dev_probe(struct rte_device *rte_dev)
>  					    MLX5_RXP_CSR_IDENTIFIER, &val);
>  	if (ret) {
>  		DRV_LOG(ERR, "CSR read failed!");
> -		return -1;
> +		goto dev_error;
>  	}
>  	if (val == MLX5_RXP_BF2_IDENTIFIER)
>  		priv->is_bf2 = 1;
> --
> 2.25.1

Thanks,
Acked-by: Ori Kam <orika@nvidia.com>



  parent reply	other threads:[~2021-09-01  8:11 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-31 20:38 Michael Baum
2021-09-01  7:47 ` Matan Azrad
2021-09-01  8:11 ` Ori Kam [this message]
2021-09-22 19:19   ` Thomas Monjalon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=DM8PR12MB540072078E930481BF1763B0D6CD9@DM8PR12MB5400.namprd12.prod.outlook.com \
    --to=orika@nvidia.com \
    --cc=dev@dpdk.org \
    --cc=matan@nvidia.com \
    --cc=michaelba@nvidia.com \
    --cc=stable@dpdk.org \
    --cc=thomas@monjalon.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).