]> 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)
commiteb455e329bf65c75372da65a6a268c519f489183
tree97f468c718de2fd5adb92acc7712c61fb71a14b4
parent77833b8a48084cb17e4bd631360b0093dd245a31
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