Skip to contentSkip to conversation

net/mlx5: fix thread workspace memory leak

PATCH In review Dong Zhou 2 participants 2 messages Oct 13, 2022 – Oct 18, 2022 Network drivers

lore
Share & tools
lore

Dong Zhou

author
#0 lore raw

PATCH 1/1 net/mlx5: fix thread workspace memory leak

The thread workspace push/pop should be paired. In the "flow_list_create" routine, if error happened the workspace pop was missed. This patch shares the workspace pop for all return paths.

Fixes 0064bf431899 ("net/mlx5: fix nested flow creation")
---
 drivers/net/mlx5/mlx5_flow.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/mlx5/mlx5_flow.c +1 -1
index e4744b0..6fb1d53 100644
@@ -7028,8 +7028,8 @@ struct mlx5_list_entry *
 	rte_errno = ret; /* Restore rte_errno. */
 	ret = rte_errno;
 	rte_errno = ret;
-	mlx5_flow_pop_thread_workspace();
 error_before_hairpin_split:
+	mlx5_flow_pop_thread_workspace();
 	rte_free(translated_actions);
 	return 0;
 }
Signature · 1 line
1.8.3.1
#1 lore raw

Hi,

Quoted 13 lines

-----Original Message-----
From: Bill Zhou <[email protected]>
Sent: Thursday, October 13, 2022 12:34 PM
To: Slava Ovsiienko <[email protected]>; Matan Azrad <[email protected]>
Cc: [email protected]; Raslan Darawsheh <[email protected]>; Xueming(Steven) Li <[email protected]>; [email protected]
Subject: [PATCH] net/mlx5: fix thread workspace memory leak

The thread workspace push/pop should be paired. In the "flow_list_create" routine, if error happened the workspace pop was missed. This patch shares the workspace pop for all return paths.

Quoted 6 lines
Fixes 0064bf431899 ("net/mlx5: fix nested flow creation")

Patch applied to next-net-mlx,

Kindest regards,
Raslan Darawsheh