diff options
author | Sagi Grimberg <sagig@mellanox.com> | 2014-07-02 16:19:24 +0300 |
---|---|---|
committer | Nicholas Bellinger <nab@linux-iscsi.org> | 2014-09-15 14:02:02 -0700 |
commit | c2f88b17a1d97ca4ecd96cc22333a7a4f1407d39 (patch) | |
tree | 0d93114be7b2fd5dc4dbc5570ed652c57f7ddd67 | |
parent | 9e82bf014195d6f0054982c463575cdce24292be (diff) | |
download | linux-c2f88b17a1d97ca4ecd96cc22333a7a4f1407d39.tar.bz2 |
Target/iser: Get isert_conn reference once got to connected_handler
In case the connection didn't reach connected state, disconnected
handler will never be invoked thus the second kref_put on
isert_conn will be missing.
Signed-off-by: Sagi Grimberg <sagig@mellanox.com>
Cc: <stable@vger.kernel.org> # v3.10+
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
-rw-r--r-- | drivers/infiniband/ulp/isert/ib_isert.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/infiniband/ulp/isert/ib_isert.c b/drivers/infiniband/ulp/isert/ib_isert.c index d4c7928a0f36..e318731ffe98 100644 --- a/drivers/infiniband/ulp/isert/ib_isert.c +++ b/drivers/infiniband/ulp/isert/ib_isert.c @@ -586,7 +586,6 @@ isert_connect_request(struct rdma_cm_id *cma_id, struct rdma_cm_event *event) init_completion(&isert_conn->conn_wait); init_completion(&isert_conn->conn_wait_comp_err); kref_init(&isert_conn->conn_kref); - kref_get(&isert_conn->conn_kref); mutex_init(&isert_conn->conn_mutex); spin_lock_init(&isert_conn->conn_lock); INIT_LIST_HEAD(&isert_conn->conn_fr_pool); @@ -746,7 +745,9 @@ isert_connect_release(struct isert_conn *isert_conn) static void isert_connected_handler(struct rdma_cm_id *cma_id) { - return; + struct isert_conn *isert_conn = cma_id->context; + + kref_get(&isert_conn->conn_kref); } static void |