patches for DPDK stable branches
 help / color / mirror / Atom feed
From: Raslan Darawsheh <rasland@nvidia.com>
To: Tal Shnaiderman <talshn@nvidia.com>, "dev@dpdk.org" <dev@dpdk.org>
Cc: NBU-Contact-Thomas Monjalon <thomas@monjalon.net>,
	Matan Azrad <matan@nvidia.com>,
	Shahaf Shuler <shahafs@nvidia.com>,
	Slava Ovsiienko <viacheslavo@nvidia.com>,
	"stable@dpdk.org" <stable@dpdk.org>
Subject: Re: [dpdk-stable] [dpdk-dev] [PATCH] mlx5/net: fix release of SQ resources in error	flow
Date: Thu, 5 Nov 2020 12:08:56 +0000	[thread overview]
Message-ID: <DM6PR12MB2748EF8544386226639A1FE1CFEE0@DM6PR12MB2748.namprd12.prod.outlook.com> (raw)
In-Reply-To: <20201028171040.6476-1-talshn@nvidia.com>

Hi,

> -----Original Message-----
> From: dev <dev-bounces@dpdk.org> On Behalf Of Tal Shnaiderman
> Sent: Wednesday, October 28, 2020 7:11 PM
> To: dev@dpdk.org
> Cc: NBU-Contact-Thomas Monjalon <thomas@monjalon.net>; Matan Azrad
> <matan@nvidia.com>; Shahaf Shuler <shahafs@nvidia.com>; Slava
> Ovsiienko <viacheslavo@nvidia.com>; stable@dpdk.org
> Subject: [dpdk-dev] [PATCH] mlx5/net: fix release of SQ resources in error
> flow
> 
> Fix in error flow in which the function mlx5_txq_release_devx_sq_resources
> is called twice by setting the release object to NULL after the first call
> 
> The incorrect flow was introduced in the work done on generic
> object creation.
> 
> Once an error flow inside mlx5_txq_create_devx_sq_resources
> occurs the function will call mlx5_txq_release_devx_sq_resources
> however the released pointers are not set to NULL after the release
> calls and undefined memory is released in the same call in
> mlx5_txq_release_devx_resources.
> 
> This results in calls to MLX5_FREE with
> an already released memory addresses and assert in mlx5_release_dbr:
> 
> EAL: Error: Invalid memory
> EAL: Error: Invalid memory
> 
> PANIC in mlx5_txq_release_devx_sq_resources():
> assert "(mlx5_release_dbr(&txq_obj->txq_ctrl->priv->dbrpgs,
>  mlx5_os_get_umem_id (txq_obj->sq_dbrec_page->umem),
>  txq_obj->sq_dbrec_offset)) == 0" failed
> 
> The fix is setting the released pointers to NULL after the first release
> calls.
> 
> Fixes: 86d259cec852 ("net/mlx5: separate Tx queue object creations")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Tal Shnaiderman <talshn@nvidia.com>
> Acked-by: Matan Azrad <matan@nvidia.com>
> ---
>  drivers/net/mlx5/mlx5_devx.c | 16 ++++++++++++----
>  1 file changed, 12 insertions(+), 4 deletions(-)
> 
Patch applied to next-net-mlx,
Kindest regards,
Raslan Darawsheh

      reply	other threads:[~2020-11-05 12:09 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-28 17:10 [dpdk-stable] " Tal Shnaiderman
2020-11-05 12:08 ` Raslan Darawsheh [this message]

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=DM6PR12MB2748EF8544386226639A1FE1CFEE0@DM6PR12MB2748.namprd12.prod.outlook.com \
    --to=rasland@nvidia.com \
    --cc=dev@dpdk.org \
    --cc=matan@nvidia.com \
    --cc=shahafs@nvidia.com \
    --cc=stable@dpdk.org \
    --cc=talshn@nvidia.com \
    --cc=thomas@monjalon.net \
    --cc=viacheslavo@nvidia.com \
    /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).