]> git.baikalelectronics.ru Git - kernel.git/commit
net/mlx5: Make sure that no dangling IPsec FS pointers exist
authorLeon Romanovsky <leonro@nvidia.com>
Thu, 10 Mar 2022 18:48:03 +0000 (20:48 +0200)
committerSaeed Mahameed <saeedm@nvidia.com>
Wed, 4 May 2022 05:59:17 +0000 (22:59 -0700)
commit3d052767f513e6689afe40a97eb355ed8e9f1f00
treec9c7ee758fb73d042f7809bcae8ece384056e99b
parentd5a95653ee6a9206d9f1b133bcea423ed18abe43
net/mlx5: Make sure that no dangling IPsec FS pointers exist

The IPsec FS code was implemented with anti-pattern there failures
in create functions left the system with dangling pointers that were
cleaned in global routines.

The less error prone approach is to make sure that failed function
cleans everything internally.

As part of this change, we remove the batch of one liners and rewrite
get/put functions to remove ambiguity.

Reviewed-by: Raed Salem <raeds@nvidia.com>
Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
drivers/net/ethernet/mellanox/mlx5/core/en_accel/ipsec_fs.c