RDMA/verbs: Check existence of function prior to accessing it
authorLeon Romanovsky <leonro@mellanox.com>
Wed, 14 Feb 2018 12:38:43 +0000 (14:38 +0200)
committerJason Gunthorpe <jgg@mellanox.com>
Fri, 16 Feb 2018 16:18:55 +0000 (09:18 -0700)
commit2188558621ed475cef55fa94ce535499452f0091
tree7e8e94051735e7515173c2f208ef737010a7c0cb
parent1f5a6c47aabc4606f91ad2e6ef71a1ff1924101c
RDMA/verbs: Check existence of function prior to accessing it

Update all the flows to ensure that function pointer exists prior
to accessing it.

This is much safer than checking the uverbs_ex_mask variable, especially
since we know that test isn't working properly and will be removed
in -next.

This prevents a user triggereable oops.

Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
drivers/infiniband/core/core_priv.h
drivers/infiniband/core/uverbs_cmd.c