linux/drivers/infiniband/hw
Moni Shoua a6bc3875f1 IB/mlx5: Protect against prefetch of invalid MR
When deferring a prefetch request we need to protect against MR or PD
being destroyed while the request is still enqueued.

The first step is to validate that PD owns the lkey that describes the MR
and that the MR that the lkey refers to is owned by that PD.

The second step is to dequeue all requests when MR is destroyed.

Since PD can't be destroyed while it owns MRs it is guaranteed that when a
worker wakes up the request it refers to is still valid.

Now, it is possible to refrain from taking a reference on the device since
it is assured to be present as pd.

While that, replace the dedicated ordered workqueue with the system
unbound workqueue to reuse an existing resource and improve
performance. This will also fix a bug of queueing to the wrong workqueue.

Fixes: 813e90b1ae ("IB/mlx5: Add advise_mr() support")
Reported-by: Parav Pandit <parav@mellanox.com>
Signed-off-by: Moni Shoua <monis@mellanox.com>
Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
2019-02-21 16:32:45 -07:00
..
bnxt_re IB/{hw,sw}: Remove 'uobject->context' dependency in object creation APIs 2019-02-15 15:38:38 -07:00
cxgb3 IB/{hw,sw}: Remove 'uobject->context' dependency in object creation APIs 2019-02-15 15:38:38 -07:00
cxgb4 iw_cxgb4: Make function read_tcb() static 2019-02-19 20:52:19 -07:00
hfi1 IB/hfi1: Add missing break in switch statement 2019-02-21 14:08:12 -07:00
hns RDMA/hns: Bugfix for set hem of SCC 2019-02-19 20:52:19 -07:00
i40iw IB/{hw,sw}: Remove 'uobject->context' dependency in object creation APIs 2019-02-15 15:38:38 -07:00
mlx4 IB/{hw,sw}: Remove 'uobject->context' dependency in object creation APIs 2019-02-15 15:38:38 -07:00
mlx5 IB/mlx5: Protect against prefetch of invalid MR 2019-02-21 16:32:45 -07:00
mthca IB/{hw,sw}: Remove 'uobject->context' dependency in object creation APIs 2019-02-15 15:38:38 -07:00
nes RDMA/nes: Remove useless usecnt variable and redundant memset 2019-02-15 21:39:15 -07:00
ocrdma RDMA/ocrdma: Use for_each_sg_dma_page iterator on umem SGL 2019-02-11 15:24:55 -07:00
qedr IB/{hw,sw}: Remove 'uobject->context' dependency in object creation APIs 2019-02-15 15:38:38 -07:00
qib drivers/IB,qib: Fix pinned/locked limit check in qib_get_user_pages() 2019-02-20 14:42:41 -07:00
usnic IB/usnic: Fix deadlock 2019-02-19 20:52:19 -07:00
vmw_pvrdma RDMA/vmw_pvrdma: Use for_each_sg_dma_page iterator on umem SGL 2019-02-11 15:24:55 -07:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00