diff options
author | Jason Gunthorpe <jgunthorpe@obsidianresearch.com> | 2015-07-30 17:22:20 -0600 |
---|---|---|
committer | Doug Ledford <dledford@redhat.com> | 2015-08-30 18:12:34 -0400 |
commit | 256b7ad27316525711dfa98b67e7c40cb28b1711 (patch) | |
tree | 82166864240246891918ac8d73a787becf0e5b6e /drivers/infiniband/ulp/iser/iser_initiator.c | |
parent | b37c788f595cd578524fb8f50d3bd2fff8b62bc3 (diff) | |
download | linux-stable-256b7ad27316525711dfa98b67e7c40cb28b1711.tar.gz linux-stable-256b7ad27316525711dfa98b67e7c40cb28b1711.tar.bz2 linux-stable-256b7ad27316525711dfa98b67e7c40cb28b1711.zip |
IB/iser: 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 this
looks trivially fixed by forcing the use of registration in a future
patch.
Signed-off-by: Jason Gunthorpe <jgunthorpe@obsidianresearch.com>
Reviewed-by: Sagi Grimberg <sagig@mellanox.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
Diffstat (limited to 'drivers/infiniband/ulp/iser/iser_initiator.c')
-rw-r--r-- | drivers/infiniband/ulp/iser/iser_initiator.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/infiniband/ulp/iser/iser_initiator.c b/drivers/infiniband/ulp/iser/iser_initiator.c index 0b1f3b54a0c1..d511879d8cdf 100644 --- a/drivers/infiniband/ulp/iser/iser_initiator.c +++ b/drivers/infiniband/ulp/iser/iser_initiator.c @@ -284,7 +284,7 @@ int iser_alloc_rx_descriptors(struct iser_conn *iser_conn, rx_sg = &rx_desc->rx_sg; rx_sg->addr = rx_desc->dma_addr; rx_sg->length = ISER_RX_PAYLOAD_SIZE; - rx_sg->lkey = device->mr->lkey; + rx_sg->lkey = device->pd->local_dma_lkey; } iser_conn->rx_desc_head = 0; @@ -538,7 +538,7 @@ int iser_send_control(struct iscsi_conn *conn, tx_dsg->addr = iser_conn->login_req_dma; tx_dsg->length = task->data_count; - tx_dsg->lkey = device->mr->lkey; + tx_dsg->lkey = device->pd->local_dma_lkey; mdesc->num_sge = 2; } |