* [PATCH 1/2] vdpa/mlx5: Don't clear mr struct on destroy MR
@ 2023-02-06 12:19 Eli Cohen
0 siblings, 0 replies; only message in thread
From: Eli Cohen @ 2023-02-06 12:19 UTC (permalink / raw)
To: mst, jasowang, si-wei.liu, eperezma, virtualization, linux-kernel
Cc: Eli Cohen
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")
Signed-off-by: Eli Cohen <elic@nvidia.com>
---
drivers/vdpa/mlx5/core/mr.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/vdpa/mlx5/core/mr.c b/drivers/vdpa/mlx5/core/mr.c
index 0a1e0b0dc37e..03e543229791 100644
--- a/drivers/vdpa/mlx5/core/mr.c
+++ b/drivers/vdpa/mlx5/core/mr.c
@@ -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);
--
2.38.1
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2023-02-06 12:20 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-02-06 12:19 [PATCH 1/2] vdpa/mlx5: Don't clear mr struct on destroy MR Eli Cohen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®