Commit c88fb63e authored by Kamal Heib's avatar Kamal Heib Committed by Zheng Zengkai
Browse files

RDMA/hns: Validate the pkey index

mainline inclusion
from mainline-v5.16-rc2
commit 2a67fcfa
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I4QOTS
CVE: NA

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma.git/commit/?id=2a67fcfa0db6b4075515bd23497750849b88850f

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

Before query pkey, make sure that the queried index is valid.

Fixes: 9a443537 ("IB/hns: Add driver files for hns RoCE driver")
Link: https://lore.kernel.org/r/20211117145954.123893-1-kamalheib1@gmail.com


Signed-off-by: default avatarKamal Heib <kamalheib1@gmail.com>
Signed-off-by: default avatarJason Gunthorpe <jgg@nvidia.com>
sigend-off-by: default avatarGuofeng Yue <yueguofeng@hisilicon.com>

Reviewed-by: default avatarYangyang Li <liyangyang20@huawei.com>
Acked-by: default avatarXie XiuQi <xiexiuqi@huawei.com>
Signed-off-by: default avatarZheng Zengkai <zhengzengkai@huawei.com>
parent e3a57716
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment