diff options
author | Sagi Grimberg <sagig@mellanox.com> | 2014-07-02 09:19:25 -0400 |
---|---|---|
committer | Nicholas Bellinger <nab@linux-iscsi.org> | 2014-09-15 17:02:16 -0400 |
commit | 0fc4ea701fcf5bc51ace4e288af5be741465f776 (patch) | |
tree | e454f3cba421a073cf64ae3a60a4b28b6a50546a | |
parent | c2f88b17a1d97ca4ecd96cc22333a7a4f1407d39 (diff) |
Target/iser: Don't put isert_conn inside disconnected handler
disconnected_handler is invoked on several CM events (such
as DISCONNECTED, DEVICE_REMOVAL, TIMEWAIT_EXIT...). Since
multiple events can occur while before isert_free_conn is
invoked, we might put all isert_conn references and free
the connection too early.
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 | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/infiniband/ulp/isert/ib_isert.c b/drivers/infiniband/ulp/isert/ib_isert.c index e318731ffe98..9959cd1faad9 100644 --- a/drivers/infiniband/ulp/isert/ib_isert.c +++ b/drivers/infiniband/ulp/isert/ib_isert.c | |||
@@ -799,7 +799,6 @@ isert_disconnect_work(struct work_struct *work) | |||
799 | 799 | ||
800 | wake_up: | 800 | wake_up: |
801 | complete(&isert_conn->conn_wait); | 801 | complete(&isert_conn->conn_wait); |
802 | isert_put_conn(isert_conn); | ||
803 | } | 802 | } |
804 | 803 | ||
805 | static void | 804 | static void |
@@ -3235,6 +3234,7 @@ static void isert_wait_conn(struct iscsi_conn *conn) | |||
3235 | wait_for_completion(&isert_conn->conn_wait_comp_err); | 3234 | wait_for_completion(&isert_conn->conn_wait_comp_err); |
3236 | 3235 | ||
3237 | wait_for_completion(&isert_conn->conn_wait); | 3236 | wait_for_completion(&isert_conn->conn_wait); |
3237 | isert_put_conn(isert_conn); | ||
3238 | } | 3238 | } |
3239 | 3239 | ||
3240 | static void isert_free_conn(struct iscsi_conn *conn) | 3240 | static void isert_free_conn(struct iscsi_conn *conn) |