mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 02:32:09 -04:00
IB/core: add support to create a unsafe global rkey to ib_create_pd
Instead of exposing ib_get_dma_mr to ULPs and letting them use it more or less unchecked, this moves the capability of creating a global rkey into the RDMA core, where it can be easily audited. It also prints a warning everytime this feature is used as well. Signed-off-by: Christoph Hellwig <[email protected]> Reviewed-by: Sagi Grimberg <[email protected]> Reviewed-by: Jason Gunthorpe <[email protected]> Reviewed-by: Steve Wise <[email protected]> Signed-off-by: Doug Ledford <[email protected]>
This commit is contained in:
parent
50d46335b0
commit
ed082d36a7
18 changed files with 57 additions and 22 deletions
|
|
@ -446,7 +446,7 @@ nvme_rdma_find_get_device(struct rdma_cm_id *cm_id)
|
|||
ndev->dev = cm_id->device;
|
||||
kref_init(&ndev->ref);
|
||||
|
||||
ndev->pd = ib_alloc_pd(ndev->dev);
|
||||
ndev->pd = ib_alloc_pd(ndev->dev, 0);
|
||||
if (IS_ERR(ndev->pd))
|
||||
goto out_free_dev;
|
||||
|
||||
|
|
|
|||
|
|
@ -848,7 +848,7 @@ nvmet_rdma_find_get_device(struct rdma_cm_id *cm_id)
|
|||
ndev->device = cm_id->device;
|
||||
kref_init(&ndev->ref);
|
||||
|
||||
ndev->pd = ib_alloc_pd(ndev->device);
|
||||
ndev->pd = ib_alloc_pd(ndev->device, 0);
|
||||
if (IS_ERR(ndev->pd))
|
||||
goto out_free_dev;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue