]> git.baikalelectronics.ru Git - kernel.git/commit
net/mlx5e: kTLS, Use _safe() iterator in mlx5e_tls_priv_tx_list_cleanup()
authorDan Carpenter <dan.carpenter@oracle.com>
Thu, 4 Aug 2022 14:44:07 +0000 (17:44 +0300)
committerSaeed Mahameed <saeedm@nvidia.com>
Mon, 22 Aug 2022 19:57:10 +0000 (12:57 -0700)
commitc3b98e511fd93e633276fd371dc8f5899d989b9f
tree843df5527be342ae85f41556a81ea116ffffa36f
parent39e77e496a89dfe00a9c2448b5766520714c1ed0
net/mlx5e: kTLS, Use _safe() iterator in mlx5e_tls_priv_tx_list_cleanup()

Use the list_for_each_entry_safe() macro to prevent dereferencing "obj"
after it has been freed.

Fixes: 5954a098f2f3 ("net/mlx5e: kTLS, Recycle objects of device-offloaded TLS TX connections")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Tariq Toukan <tariqt@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
drivers/net/ethernet/mellanox/mlx5/core/en_accel/ktls_tx.c