* [PATCH v2] vdpa/mlx5: Directly assign memory key
@ 2023-02-05 7:29 Eli Cohen
0 siblings, 0 replies; only message in thread
From: Eli Cohen @ 2023-02-05 7:29 UTC (permalink / raw)
To: mst, jasowang, si-wei.liu, virtualization, linux-kernel; +Cc: Eli Cohen
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: 29064bfdabd5 ("vdpa/mlx5: Add support library for mlx5 VDPA implementation")
Signed-off-by: Eli Cohen <elic@nvidia.com>
---
v1 -> v2:
Fix bad grammar in change log
drivers/vdpa/mlx5/core/resources.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/vdpa/mlx5/core/resources.c b/drivers/vdpa/mlx5/core/resources.c
index 9800f9bec225..45ad41287a31 100644
--- a/drivers/vdpa/mlx5/core/resources.c
+++ b/drivers/vdpa/mlx5/core/resources.c
@@ -213,7 +213,7 @@ int mlx5_vdpa_create_mkey(struct mlx5_vdpa_dev *mvdev, u32 *mkey, u32 *in,
return err;
mkey_index = MLX5_GET(create_mkey_out, lout, mkey_index);
- *mkey |= mlx5_idx_to_mkey(mkey_index);
+ *mkey = mlx5_idx_to_mkey(mkey_index);
return 0;
}
--
2.38.1
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2023-02-05 7:29 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-02-05 7:29 [PATCH v2] vdpa/mlx5: Directly assign memory key 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®