RDMA/mlx5: Do not allow rereg of a ODP MR
authorJason Gunthorpe <jgg@mellanox.com>
Tue, 1 Oct 2019 15:38:16 +0000 (12:38 -0300)
committerJason Gunthorpe <jgg@mellanox.com>
Fri, 4 Oct 2019 18:54:21 +0000 (15:54 -0300)
commit880505cfef1d086d18b59d2920eb2160429ffa1f
treea8762b59e316f0f342e4845b77f1f446188841a3
parent1cbe866cbcb53338de33cf67262e73f9315a9725
RDMA/mlx5: Do not allow rereg of a ODP MR

This code is completely broken, the umem of a ODP MR simply cannot be
discarded without a lot more locking, nor can an ODP mkey be blithely
destroyed via destroy_mkey().

Fixes: 6aec21f6a832 ("IB/mlx5: Page faults handling infrastructure")
Link: https://lore.kernel.org/r/20191001153821.23621-2-jgg@ziepe.ca
Reviewed-by: Artemy Kovalyov <artemyko@mellanox.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
drivers/infiniband/hw/mlx5/mr.c