patches for DPDK stable branches
 help / color / mirror / Atom feed
From: Kevin Traynor <ktraynor@redhat.com>
To: Michael Baum <michaelba@nvidia.com>, stable@dpdk.org
Cc: Matan Azrad <matan@nvidia.com>,
	Viacheslav Ovsiienko <viacheslavo@nvidia.com>
Subject: Re: [PATCH 21.11 1/2] net/mlx5: fix race condition in counter pool resizing
Date: Tue, 29 Nov 2022 11:50:41 +0000	[thread overview]
Message-ID: <bc272097-022a-6a05-8047-aa41f2aaf60d@redhat.com> (raw)
In-Reply-To: <20221124075320.2026822-2-michaelba@nvidia.com>

On 24/11/2022 07:53, Michael Baum wrote:
> [ upstream commit a94e89e47b59ebaf84246bbb34c06e1a004cde8a ]
> 
> Counter management structure has array of counter pools. This array is
> invalid in management structure initialization and grows on demand.
> 
> The resizing include:
> 1. Allocate memory for the new size.
> 2. Copy the existing data to the new memory.
> 3. Move the pointer to the new memory.
> 4. Free the old memory.
> 
> The third step can be performed before for this function, and compiler
> may do that, but another thread might read the pointer before coping and
> read invalid data or even crash.
> 
> This patch allocates memory for this array once in management structure
> initialization and limit the counters number by 16M.
> 
> Fixes: 3aa279157fa0 ("net/mlx5: synchronize flow counter pool creation")
> 
> Signed-off-by: Michael Baum<michaelba@nvidia.com>
> Acked-by: Matan Azrad<matan@nvidia.com>
> ---

Thanks for the backports. Applied both patches to 21.11 branch.


  reply	other threads:[~2022-11-29 11:50 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-24  7:53 [PATCH 21.11 0/2] net/mlx5: some backported fixes Michael Baum
2022-11-24  7:53 ` [PATCH 21.11 1/2] net/mlx5: fix race condition in counter pool resizing Michael Baum
2022-11-29 11:50   ` Kevin Traynor [this message]
2022-11-24  7:53 ` [PATCH 21.11 2/2] net/mlx5: fix port event cleaning order Michael Baum

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=bc272097-022a-6a05-8047-aa41f2aaf60d@redhat.com \
    --to=ktraynor@redhat.com \
    --cc=matan@nvidia.com \
    --cc=michaelba@nvidia.com \
    --cc=stable@dpdk.org \
    --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).