]> git.baikalelectronics.ru Git - kernel.git/commit
RDMA/hns: Validate the pkey index
authorKamal Heib <kamalheib1@gmail.com>
Wed, 17 Nov 2021 14:59:54 +0000 (16:59 +0200)
committerJason Gunthorpe <jgg@nvidia.com>
Wed, 17 Nov 2021 20:52:18 +0000 (16:52 -0400)
commite0018fed7d936ba4d11fa93f0c2aab3c06aff9ba
treeddb07c157175a73198bae03d00b0455f15d436a7
parent24abd76548ec8e2c80046d08a4037c927d99acef
RDMA/hns: Validate the pkey index

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

Fixes: cd69dc18740f ("IB/hns: Add driver files for hns RoCE driver")
Link: https://lore.kernel.org/r/20211117145954.123893-1-kamalheib1@gmail.com
Signed-off-by: Kamal Heib <kamalheib1@gmail.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
drivers/infiniband/hw/hns/hns_roce_main.c