OpenCloudOS-Kernel/drivers/infiniband/hw
Jason Gunthorpe 0417791536 RDMA/mlx5: Add missing synchronize_srcu() for MW cases
While MR uses live as the SRCU 'update', the MW case uses the xarray
directly, xa_erase() causes the MW to become inaccessible to the pagefault
thread.

Thus whenever a MW is removed from the xarray we must synchronize_srcu()
before freeing it.

This must be done before freeing the mkey as re-use of the mkey while the
pagefault thread is using the stale mkey is undesirable.

Add the missing synchronizes to MW and DEVX indirect mkey and delete the
bogus protection against double destroy in mlx5_core_destroy_mkey()

Fixes: 534fd7aac5 ("IB/mlx5: Manage indirection mkey upon DEVX flow for ODP")
Fixes: 6aec21f6a8 ("IB/mlx5: Page faults handling infrastructure")
Link: https://lore.kernel.org/r/20191001153821.23621-7-jgg@ziepe.ca
Reviewed-by: Artemy Kovalyov <artemyko@mellanox.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
2019-10-04 15:54:22 -03:00
..
bnxt_re RDMA/bnxt_re: Fix spelling mistake "missin_resp" -> "missing_resp" 2019-09-16 10:58:57 -03:00
cxgb3 RDMA/{cxgb3, cxgb4, i40iw}: Remove common code 2019-08-12 10:19:43 -04:00
cxgb4 RDMA/cxgb4: Do not dma memory off of the stack 2019-10-04 15:13:27 -03:00
efa RDMA/efa: Fix incorrect error print 2019-09-16 14:25:43 -03:00
hfi1 RDMA/hfi1: Prevent memory leak in sdma_init 2019-10-01 11:34:55 -03:00
hns RDMA subsystem updates for 5.4 2019-09-21 10:26:24 -07:00
i40iw RDMA/i40iw: Associate ibdev to netdev before IB device registration 2019-10-04 14:29:14 -03:00
mlx4 Merge tag 'v5.3-rc8' into rdma.git for-next 2019-09-13 16:59:51 -03:00
mlx5 RDMA/mlx5: Add missing synchronize_srcu() for MW cases 2019-10-04 15:54:22 -03:00
mthca IB: Remove unneeded memset 2019-07-03 14:26:49 -03:00
ocrdma RDMA: Introduce ib_port_phys_state enum 2019-08-12 10:18:52 -04:00
qedr RDMA: Introduce ib_port_phys_state enum 2019-08-12 10:18:52 -04:00
qib mm/gup: add make_dirty arg to put_user_pages_dirty_lock() 2019-09-24 15:54:08 -07:00
usnic mm/gup: add make_dirty arg to put_user_pages_dirty_lock() 2019-09-24 15:54:08 -07:00
vmw_pvrdma RDMA/vmw_pvrdma: Free SRQ only once 2019-10-01 10:47:58 -03:00
Makefile rdma: Remove nes 2019-06-13 09:59:49 -04:00