]> git.baikalelectronics.ru Git - kernel.git/commit
RDMA/core: Allocate the pkey cache only if the pkey_tbl_len is set
authorKamal Heib <kamalheib1@gmail.com>
Tue, 14 Jul 2020 18:34:09 +0000 (21:34 +0300)
committerJason Gunthorpe <jgg@nvidia.com>
Mon, 20 Jul 2020 19:18:16 +0000 (16:18 -0300)
commitc0a968f566a8f3dfd68fa3047a20df5d7cbcbad2
treefd968df0e7fdd6297f0532cdb30d4d275e3c79b0
parent7375f046e1241959f246d909b40c2d8b97c61f5f
RDMA/core: Allocate the pkey cache only if the pkey_tbl_len is set

Allocate the pkey cache only if the pkey_tbl_len is set by the provider,
also add checks to avoid accessing the pkey cache when it not initialized.

Link: https://lore.kernel.org/r/20200714183414.61069-3-kamalheib1@gmail.com
Signed-off-by: Kamal Heib <kamalheib1@gmail.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
drivers/infiniband/core/cache.c