Skip to contentSkip to conversation

vdpa/mlx5: Don't clear mr struct on destroy MR

PATCH In review Eli Cohen 1 participant 1 message Feb 6, 2023

Subsystems (2)
lore
Share & tools
lore

Eli Cohen

author
#0 lore raw

PATCH 1/2 vdpa/mlx5: Don't clear mr struct on destroy MR

Clearing the mr struct erases the lock owner and causes warnings to be emitted. It is not required to clear the mr so remove the memset call.

Fixes 94abbccdf291 ("vdpa/mlx5: Add shared memory registration code")
---
 drivers/vdpa/mlx5/core/mr.c | 1 -
 1 file changed, 1 deletion(-)
drivers/vdpa/mlx5/core/mr.c +0 -1
index 0a1e0b0dc37e..03e543229791 100644
@@ -503,7 +503,6 @@ void mlx5_vdpa_destroy_mr(struct mlx5_vdpa_dev *mvdev)
 	else
 		destroy_dma_mr(mvdev, mr);
 
-	memset(mr, 0, sizeof(*mr));
 	mr->initialized = false;
 out:
 	mutex_unlock(&mr->mkey_mtx);
Signature · 1 line
2.38.1