Skip to content

Commit 446062e

Browse files
elic307imstsirkin
authored andcommitted
vdpa/mlx5: Directly assign memory key
When creating a memory key, the key value should be assigned to the passed pointer and not or'ed to. No functional issue was observed due to this bug. Fixes: 29064bf ("vdpa/mlx5: Add support library for mlx5 VDPA implementation") Signed-off-by: Eli Cohen <elic@nvidia.com> Message-Id: <20230205072906.1108194-1-elic@nvidia.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
1 parent 0d0ed40 commit 446062e

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/vdpa/mlx5/core/resources.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ int mlx5_vdpa_create_mkey(struct mlx5_vdpa_dev *mvdev, u32 *mkey, u32 *in,
213213
return err;
214214

215215
mkey_index = MLX5_GET(create_mkey_out, lout, mkey_index);
216-
*mkey |= mlx5_idx_to_mkey(mkey_index);
216+
*mkey = mlx5_idx_to_mkey(mkey_index);
217217
return 0;
218218
}
219219

0 commit comments

Comments
 (0)