aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/ulp/srp
diff options
context:
space:
mode:
authorJason Gunthorpe <jgunthorpe@obsidianresearch.com>2015-07-30 17:22:22 -0600
committerDoug Ledford <dledford@redhat.com>2015-08-30 18:12:35 -0400
commite6bf5f48d2adc443689c5e627bcd559b00201e5c (patch)
treedb586539e6decfe1c9091a4bdee62a392909c238 /drivers/infiniband/ulp/srp
parentiser-target: Remove ib_get_dma_mr calls (diff)
downloadlinux-dev-e6bf5f48d2adc443689c5e627bcd559b00201e5c.tar.xz
linux-dev-e6bf5f48d2adc443689c5e627bcd559b00201e5c.zip
IB/srp: Use pd->local_dma_lkey
Replace all leys with pd->local_dma_lkey. This driver does not support iWarp, so this is safe. The insecure use of ib_get_dma_mr is thus isolated to an rkey, and will have to be fixed separately. Signed-off-by: Jason Gunthorpe <jgunthorpe@obsidianresearch.com> Reviewed-by: Sagi Grimberg <sagig@mellanox.com> Reviewed-by: Bart Van Assche <bart.vanassche@sandisk.com> Signed-off-by: Doug Ledford <dledford@redhat.com>
Diffstat (limited to 'drivers/infiniband/ulp/srp')
-rw-r--r--drivers/infiniband/ulp/srp/ib_srp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/infiniband/ulp/srp/ib_srp.c b/drivers/infiniband/ulp/srp/ib_srp.c
index c9c4f647b170..b890367d26ed 100644
--- a/drivers/infiniband/ulp/srp/ib_srp.c
+++ b/drivers/infiniband/ulp/srp/ib_srp.c
@@ -3154,7 +3154,7 @@ static ssize_t srp_create_target(struct device *dev,
target->io_class = SRP_REV16A_IB_IO_CLASS;
target->scsi_host = target_host;
target->srp_host = host;
- target->lkey = host->srp_dev->mr->lkey;
+ target->lkey = host->srp_dev->pd->local_dma_lkey;
target->rkey = host->srp_dev->mr->rkey;
target->cmd_sg_cnt = cmd_sg_entries;
target->sg_tablesize = indirect_sg_entries ? : cmd_sg_entries;