]> git.baikalelectronics.ru Git - kernel.git/commit
RDMA/uverbs: Fix validity check for modify QP
authorMajd Dibbiny <majd@mellanox.com>
Tue, 18 Sep 2018 07:51:37 +0000 (10:51 +0300)
committerJason Gunthorpe <jgg@mellanox.com>
Thu, 20 Sep 2018 22:47:30 +0000 (16:47 -0600)
commit905c9890b5efe1de48ae699edc96e7387335dc0f
tree40957a7874ee1c9ad9b124d7ba630d4bdcc16e4b
parentdfaed1b7968a2dd1bfee1ddb2f202f4d4e9e6d6b
RDMA/uverbs: Fix validity check for modify QP

Uverbs shouldn't enforce QP state in the command unless the user set the QP
state bit in the attribute mask.

In addition, only copy qp attr fields which have the corresponding bit set
in the attribute mask over to the internal attr structure.

Fixes: 5f4b89b63a64 ("RDMA/uverbs: Ensure validity of current QP state value")
Fixes: 0e3166a0f798 ("[PATCH] IB uverbs: core implementation")
Signed-off-by: Majd Dibbiny <majd@mellanox.com>
Signed-off-by: Jack Morgenstein <jackm@dev.mellanox.co.il>
Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
drivers/infiniband/core/uverbs_cmd.c