diff options
author | Moni Shoua <monis@mellanox.com> | 2020-01-15 15:43:31 +0300 |
---|---|---|
committer | Leon Romanovsky <leonro@mellanox.com> | 2020-01-16 17:14:28 +0300 |
commit | c320e527e1548305f31d95ec405140b04aed25f5 (patch) | |
tree | 32ea616c9c68d65aac0e2749d013987eea3f6079 /drivers/infiniband/hw/vmw_pvrdma/pvrdma_cq.c | |
parent | b3a987b0264d3ddbb24293ebff10eddfc472f653 (diff) | |
download | linux-c320e527e1548305f31d95ec405140b04aed25f5.tar.xz |
IB: Allow calls to ib_umem_get from kernel ULPs
So far the assumption was that ib_umem_get() and ib_umem_odp_get()
are called from flows that start in UVERBS and therefore has a user
context. This assumption restricts flows that are initiated by ULPs
and need the service that ib_umem_get() provides.
This patch changes ib_umem_get() and ib_umem_odp_get() to get IB device
directly by relying on the fact that both UVERBS and ULPs sets that
field correctly.
Reviewed-by: Guy Levi <guyle@mellanox.com>
Signed-off-by: Moni Shoua <monis@mellanox.com>
Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
Diffstat (limited to 'drivers/infiniband/hw/vmw_pvrdma/pvrdma_cq.c')
-rw-r--r-- | drivers/infiniband/hw/vmw_pvrdma/pvrdma_cq.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/infiniband/hw/vmw_pvrdma/pvrdma_cq.c b/drivers/infiniband/hw/vmw_pvrdma/pvrdma_cq.c index a26a4fd86bf4..4f6cc0de7ef9 100644 --- a/drivers/infiniband/hw/vmw_pvrdma/pvrdma_cq.c +++ b/drivers/infiniband/hw/vmw_pvrdma/pvrdma_cq.c @@ -135,7 +135,7 @@ int pvrdma_create_cq(struct ib_cq *ibcq, const struct ib_cq_init_attr *attr, goto err_cq; } - cq->umem = ib_umem_get(udata, ucmd.buf_addr, ucmd.buf_size, + cq->umem = ib_umem_get(ibdev, ucmd.buf_addr, ucmd.buf_size, IB_ACCESS_LOCAL_WRITE); if (IS_ERR(cq->umem)) { ret = PTR_ERR(cq->umem); |