IB/mlx5: Fix unreg_umr to ignore the mkey state
authorYishai Hadas <yishaih@mellanox.com>
Tue, 23 Jul 2019 06:57:25 +0000 (09:57 +0300)
committerJason Gunthorpe <jgg@mellanox.com>
Wed, 24 Jul 2019 19:42:27 +0000 (16:42 -0300)
commit6a053953739d23694474a5f9c81d1a30093da81a
treed05c421661f3774fbe406f02fc2483ba11e643b0
parentaf0653d56657340a80622aeb96707f7fc8506225
IB/mlx5: Fix unreg_umr to ignore the mkey state

Fix unreg_umr to ignore the mkey state and do not fail if was freed.  This
prevents a case that a user space application already changed the mkey
state to free and then the UMR operation will fail leaving the mkey in an
inappropriate state.

Link: https://lore.kernel.org/r/20190723065733.4899-3-leon@kernel.org
Cc: <stable@vger.kernel.org> # 3.19
Fixes: 968e78dd9644 ("IB/mlx5: Enhance UMR support to allow partial page table update")
Signed-off-by: Yishai Hadas <yishaih@mellanox.com>
Reviewed-by: Artemy Kovalyov <artemyko@mellanox.com>
Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
Reviewed-by: Jason Gunthorpe <jgg@mellanox.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
drivers/infiniband/hw/mlx5/mlx5_ib.h
drivers/infiniband/hw/mlx5/mr.c
drivers/infiniband/hw/mlx5/qp.c