]> git.ipfire.org Git - people/arne_f/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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 20 Oct 2018 07:47:07 +0000 (09:47 +0200)
commit7dc74b2622c2aaa550fb2d0175a4fe4ce4035282
tree156de4754b2fe318eccccd23b929f502a19c50b3
parent2c93f6f118adb99dc613ff4e4d33c5226289ca90
RDMA/uverbs: Fix validity check for modify QP

[ Upstream commit 4eeed3686981ff887bbdd7254139e2eca276534c ]

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: 88de869bbe4f ("RDMA/uverbs: Ensure validity of current QP state value")
Fixes: bc38a6abdd5a ("[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>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/infiniband/core/uverbs_cmd.c