diff options
author | Sagi Grimberg <sagig@mellanox.com> | 2015-01-18 16:51:06 +0200 |
---|---|---|
committer | Roland Dreier <roland@purestorage.com> | 2015-02-17 12:32:46 -0800 |
commit | 6606e6a2ff2710b473838b291dc533cd8fc1471f (patch) | |
tree | 1d37d500fd385ac7c627881b9254c37c3bb0d6b2 /drivers/infiniband/ulp/iser/iser_initiator.c | |
parent | c6c95ef4cec680f7a10aa425a9970744b35b6489 (diff) | |
download | linux-6606e6a2ff2710b473838b291dc533cd8fc1471f.tar.gz linux-6606e6a2ff2710b473838b291dc533cd8fc1471f.tar.bz2 linux-6606e6a2ff2710b473838b291dc533cd8fc1471f.zip |
IB/iser: Fix memory regions possible leak
When teardown process starts during live IO, we need to keep the
memory regions pool (frmr/fmr) until all in-flight tasks are properly
released, since each task may return a memory region to the pool. In
order to do this, we pass a destroy flag to iser_free_ib_conn_res to
indicate we can destroy the device and the memory regions
pool. iser_conn_release will pass it as true and also DEVICE_REMOVAL
event (we need to let the device to properly remove).
Also, Since we conditionally call iser_free_rx_descriptors,
remove the extra check on iser_conn->rx_descs.
Fixes: 5426b1711fd0 ("IB/iser: Collapse cleanup and disconnect handlers")
Reported-by: Or Gerlitz <ogerlitz@mellanox.com>
Signed-off-by: Sagi Grimberg <sagig@mellanox.com>
Signed-off-by: Roland Dreier <roland@purestorage.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, 0 insertions, 4 deletions
diff --git a/drivers/infiniband/ulp/iser/iser_initiator.c b/drivers/infiniband/ulp/iser/iser_initiator.c index bdf2b22e336b..20e859a6f1a6 100644 --- a/drivers/infiniband/ulp/iser/iser_initiator.c +++ b/drivers/infiniband/ulp/iser/iser_initiator.c @@ -320,9 +320,6 @@ void iser_free_rx_descriptors(struct iser_conn *iser_conn) struct ib_conn *ib_conn = &iser_conn->ib_conn; struct iser_device *device = ib_conn->device; - if (!iser_conn->rx_descs) - goto free_login_buf; - if (device->iser_free_rdma_reg_res) device->iser_free_rdma_reg_res(ib_conn); @@ -334,7 +331,6 @@ void iser_free_rx_descriptors(struct iser_conn *iser_conn) /* make sure we never redo any unmapping */ iser_conn->rx_descs = NULL; -free_login_buf: iser_free_login_buf(iser_conn); } |