patch 'net/mlx5: fix destroying empty matchers list' has been queued to stable release 21.11.1

Kevin Traynor ktraynor at redhat.com
Tue Mar 8 15:14:33 CET 2022


Hi,

FYI, your patch has been queued to stable release 21.11.1

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 03/14/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/10af65574b7f862f49744b6cb8a6b8e5aa77e1cb

Thanks.

Kevin

---
>From 10af65574b7f862f49744b6cb8a6b8e5aa77e1cb Mon Sep 17 00:00:00 2001
From: Adham Masarwah <adham at nvidia.com>
Date: Wed, 23 Feb 2022 11:32:05 +0200
Subject: [PATCH] net/mlx5: fix destroying empty matchers list

[ upstream commit dc065d6efdf1cabe042944aac457fa19235ad632 ]

The table remove callback function is trying to destroy the
matchers list associated with table entries without checking
if the list is valid, which causes null pointer dereference.
Fixed by validating the matchers list before destroying it.

Issue can be reproduced with testpmd on Windows, when you run:
port close all

Fixes: 1872635570be ("net/mlx5: make matcher list thread safe")

Signed-off-by: Adham Masarwah <adham at nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo at nvidia.com>
Acked-by: Tal Shnaiderman <talshn at nvidia.com>
Tested-by: Idan Hackmon <idanhac at nvidia.com>
---
 drivers/net/mlx5/mlx5_flow_dv.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c
index 5225978a3b..43d8db14ad 100644
--- a/drivers/net/mlx5/mlx5_flow_dv.c
+++ b/drivers/net/mlx5/mlx5_flow_dv.c
@@ -10519,5 +10519,6 @@ flow_dv_tbl_remove_cb(void *tool_ctx, struct mlx5_list_entry *entry)
 			tbl_data->group_id);
 	}
-	mlx5_list_destroy(tbl_data->matchers);
+	if (tbl_data->matchers)
+		mlx5_list_destroy(tbl_data->matchers);
 	mlx5_ipool_free(sh->ipool[MLX5_IPOOL_JUMP], tbl_data->idx);
 }
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-03-08 13:55:28.875916537 +0000
+++ 0018-net-mlx5-fix-destroying-empty-matchers-list.patch	2022-03-08 13:55:28.429314978 +0000
@@ -1 +1 @@
-From dc065d6efdf1cabe042944aac457fa19235ad632 Mon Sep 17 00:00:00 2001
+From 10af65574b7f862f49744b6cb8a6b8e5aa77e1cb Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit dc065d6efdf1cabe042944aac457fa19235ad632 ]
+
@@ -15 +16,0 @@
-Cc: stable at dpdk.org
@@ -26 +27 @@
-index ae88a1cc29..caee0f7c91 100644
+index 5225978a3b..43d8db14ad 100644
@@ -29 +30 @@
-@@ -10621,5 +10621,6 @@ flow_dv_tbl_remove_cb(void *tool_ctx, struct mlx5_list_entry *entry)
+@@ -10519,5 +10519,6 @@ flow_dv_tbl_remove_cb(void *tool_ctx, struct mlx5_list_entry *entry)



More information about the stable mailing list