]> 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)
commitca768262769855fdef86c56e817160769c318911
tree40957a7874ee1c9ad9b124d7ba630d4bdcc16e4b
parent4818bc52c55ab02bd1a02ccd9b253e76289a233b
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: 2bbb4c539ea0 ("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