[Patch 22.11] net/mana: fix multi-process tracking

Luca Boccassi luca.boccassi at gmail.com
Thu Mar 13 01:06:05 CET 2025


On Wed, 12 Mar 2025 at 22:33, <longli at linuxonhyperv.com> wrote:
>
> From: Long Li <longli at microsoft.com>
>
> [ upstream commit 57aa3ec91ecf13ab2f11e4dc0dc74c50a2afa0cc ]
>
> The driver uses mana_shared_data for tracking usage count for primary
> process. This is not correct as the mana_shared_data is allocated
> by the primary and is meant to track usage of secondary process by the
> primary process. And it creates a race condition when the device is
> removed because the counter is no longer available if this shared
> memory is freed.
>
> Move the usage count tracking to mana_local_data and fix the race
> condition in mana_pci_remove().
>
> Fixes: 517ed6e2d590 ("net/mana: add basic driver with build environment")
> Cc: stable at dpdk.org
>
> Signed-off-by: Long Li <longli at microsoft.com>
> ---
>  drivers/net/mana/mana.c | 100 ++++++++++++++++++++++------------------
>  drivers/net/mana/mana.h |   6 +--
>  drivers/net/mana/mp.c   |   2 +-
>  3 files changed, 58 insertions(+), 50 deletions(-)

Thanks, applied


More information about the stable mailing list