]> git.baikalelectronics.ru Git - kernel.git/commit
RDMA/uverbs: Properly check command supported mask
authorLeon Romanovsky <leonro@mellanox.com>
Wed, 21 Feb 2018 16:12:38 +0000 (18:12 +0200)
committerDoug Ledford <dledford@redhat.com>
Fri, 23 Feb 2018 03:29:50 +0000 (22:29 -0500)
commitd8c8f55f8685fe0ba20be11b8e3d64916d9a93e9
tree97f468c718de2fd5adb92acc7712c61fb71a14b4
parent0e7e39d4ca6e91b562166acc8fa64b0f27b16d30
RDMA/uverbs: Properly check command supported mask

The check based on index is not sufficient because

  IB_USER_VERBS_EX_CMD_CREATE_CQ = IB_USER_VERBS_CMD_CREATE_CQ

and IB_USER_VERBS_CMD_CREATE_CQ <= IB_USER_VERBS_CMD_OPEN_QP,
so if we execute IB_USER_VERBS_EX_CMD_CREATE_CQ this code checks
ib_dev->uverbs_cmd_mask not ib_dev->uverbs_ex_cmd_mask.

Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
drivers/infiniband/core/uverbs_main.c