Skip to content

Commit

Permalink
net/mlx5: fix thread workspace memory leak
Browse files Browse the repository at this point in the history
[ upstream commit 4df7f80 ]

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: 0064bf4 ("net/mlx5: fix nested flow creation")

Signed-off-by: Dong Zhou <dongzhou@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
  • Loading branch information
BillZhou734 authored and kevintraynor committed Nov 7, 2022
1 parent a5ff9eb commit c31f9fd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/mlx5/mlx5_flow.c
Expand Up @@ -6768,8 +6768,8 @@ flow_list_create(struct rte_eth_dev *dev, enum mlx5_flow_type type,
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;
}
Expand Down

0 comments on commit c31f9fd

Please sign in to comment.