numam-dpdk/drivers/common
Michael Baum f550a49d49 common/mlx5: fix memory leak in Windows MR deregistration
The "mlx5_devx_cmd_mkey_create" DevX cmd allocates DevX object using
mlx5_malloc and then creates MKey using glue function.
Compatibly, "mlx5_devx_cmd_destroy" cmd releases first the MKey using
glue function, and then free the DevX object using mlx5_free.

On Windows OS, the reg_mr function creates Mkey using
"mlx5_devx_cmd_mkey_create" cmd, but dereg_mr function using directly
glue function without freeing the object.
This behavior causes memory leak at each MR release.

In addition, the dereg_mr function makes sure that the MR pointer is
valid before destroying its fields, but always calls the memset function
that makes a difference to it.

This patch moves the dereg_mr function to use "mlx5_devx_cmd_destroy"
instead of glue function, and extends the validity test to the whole
function.

Fixes: ba42071982 ("common/mlx5: add reg/dereg MR on Windows")
Cc: stable@dpdk.org

Signed-off-by: Michael Baum <michaelba@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
2021-11-17 15:51:40 +01:00
..
cnxk common/cnxk: fix memory leak 2021-11-11 16:12:23 +01:00
cpt common/cpt: fix KASUMI input length 2021-11-16 07:38:07 +01:00
dpaax dma/dpaa: introduce DPAA DMA driver skeleton 2021-11-10 13:48:38 +01:00
iavf common/iavf: support IPsec inline crypto 2021-10-29 04:15:31 +02:00
mlx5 common/mlx5: fix memory leak in Windows MR deregistration 2021-11-17 15:51:40 +01:00
mvep drivers: change indentation in build files 2021-04-21 14:04:09 +02:00
octeontx common/octeontx: enable build only on 64-bit Linux 2021-10-15 19:13:13 +02:00
octeontx2 common/octeontx2: update mailbox version to 0xb 2021-10-29 16:08:17 +02:00
qat common/qat: fix queue pair config overrun 2021-11-16 08:27:44 +01:00
sfc_efx common/sfc_efx/base: support MAC address edit actions in MAE 2021-11-17 14:10:08 +01:00
meson.build drivers: clean up build lists 2021-04-21 12:37:55 +02:00