Commit 53b0d551 authored by Aya Levin's avatar Aya Levin Committed by Zheng Zengkai
Browse files

net/mlx5: Reset mkey index on creation



stable inclusion
from stable-5.10.46
commit 327e626c39f3e152b0306b41708a51a5d471c165
bugzilla: 168323
CVE: NA

--------------------------------

[ Upstream commit 0232fc2d ]

Reset only the index part of the mkey and keep the variant part. On
devlink reload, driver recreates mkeys, so the mkey index may change.
Trying to preserve the variant part of the mkey, driver mistakenly
merged the mkey index with current value. In case of a devlink reload,
current value of index part is dirty, so the index may be corrupted.

Fixes: 54c62e13 ("{IB,net}/mlx5: Setup mkey variant before mr create command invocation")
Signed-off-by: default avatarAya Levin <ayal@nvidia.com>
Signed-off-by: default avatarAmir Tzin <amirtz@nvidia.com>
Reviewed-by: default avatarTariq Toukan <tariqt@nvidia.com>
Signed-off-by: default avatarSaeed Mahameed <saeedm@nvidia.com>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
Signed-off-by: default avatarChen Jun <chenjun102@huawei.com>
Acked-by: default avatarWeilong Chen <chenweilong@huawei.com>
Signed-off-by: default avatarZheng Zengkai <zhengzengkai@huawei.com>
parent c1a54880
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment