patch 'net/mlx5: fix indexed pool local cache crash' has been queued to stable release 21.11.3

Kevin Traynor ktraynor at redhat.com
Wed Nov 23 19:03:30 CET 2022


Hi,

FYI, your patch has been queued to stable release 21.11.3

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/28/22. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/815d59452a8ac311bfdf0ea1858d64ddd482a859

Thanks.

Kevin

---
>From 815d59452a8ac311bfdf0ea1858d64ddd482a859 Mon Sep 17 00:00:00 2001
From: Alexander Kozyrev <akozyrev at nvidia.com>
Date: Wed, 9 Nov 2022 14:58:19 +0200
Subject: [PATCH] net/mlx5: fix indexed pool local cache crash

[ upstream commit 7869d603807c447f357ec3b35c193a1019e6e1b2 ]

Local cache for an indexed pool is not initialized in the situation when
all the indices are allocated on one CPU core and freed on another one.
That leads to a crash once we try to check its reference counter.
Check that the local cache is initialized before accessing this counter.

Fixes: d15c0946beea ("net/mlx5: add indexed pool local cache")

Signed-off-by: Alexander Kozyrev <akozyrev at nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo at nvidia.com>
---
 drivers/net/mlx5/mlx5_utils.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/mlx5/mlx5_utils.c b/drivers/net/mlx5/mlx5_utils.c
index 4115a2ad77..b295702fd4 100644
--- a/drivers/net/mlx5/mlx5_utils.c
+++ b/drivers/net/mlx5/mlx5_utils.c
@@ -480,5 +480,5 @@ _mlx5_ipool_free_cache(struct mlx5_indexed_pool *pool, int cidx, uint32_t idx)
 	gc = pool->gc;
 	if (ilc->lc != gc) {
-		if (!(--ilc->lc->ref_cnt))
+		if (ilc->lc && !(--ilc->lc->ref_cnt))
 			olc = ilc->lc;
 		gc->ref_cnt++;
-- 
2.38.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-11-23 09:55:57.506144177 +0000
+++ 0017-net-mlx5-fix-indexed-pool-local-cache-crash.patch	2022-11-23 09:55:57.032149214 +0000
@@ -1 +1 @@
-From 7869d603807c447f357ec3b35c193a1019e6e1b2 Mon Sep 17 00:00:00 2001
+From 815d59452a8ac311bfdf0ea1858d64ddd482a859 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 7869d603807c447f357ec3b35c193a1019e6e1b2 ]
+
@@ -12 +13,0 @@
-Cc: stable at dpdk.org



More information about the stable mailing list