summaryrefslogtreecommitdiffstats
path: root/drivers/vdpa
diff options
context:
space:
mode:
authorEli Cohen <elic@nvidia.com>2023-02-06 13:19:56 +0100
committerMichael S. Tsirkin <mst@redhat.com>2023-02-21 01:26:59 +0100
commitaef24311bd2d8a6d39a80c34f278b0fd1692aed3 (patch)
treec4022f527fce5de3546fcaa4e4eda921575537fe /drivers/vdpa
parentvdpa/mlx5: Directly assign memory key (diff)
downloadlinux-aef24311bd2d8a6d39a80c34f278b0fd1692aed3.tar.xz
linux-aef24311bd2d8a6d39a80c34f278b0fd1692aed3.zip
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") Signed-off-by: Eli Cohen <elic@nvidia.com> Message-Id: <20230206121956.1149356-1-elic@nvidia.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'drivers/vdpa')
-rw-r--r--drivers/vdpa/mlx5/core/mr.c1
1 files changed, 0 insertions, 1 deletions
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);