[3.13.y.z extended stable] Patch "Target/iser: Don't put isert_conn inside disconnected handler" has been added to staging queue

Kamal Mostafa kamal at canonical.com
Thu Oct 9 20:51:34 UTC 2014


This is a note to let you know that I have just added a patch titled

    Target/iser: Don't put isert_conn inside disconnected handler

to the linux-3.13.y-queue branch of the 3.13.y.z extended stable tree 
which can be found at:

 http://kernel.ubuntu.com/git?p=ubuntu/linux.git;a=shortlog;h=refs/heads/linux-3.13.y-queue

This patch is scheduled to be released in version 3.13.11.9.

If you, or anyone else, feels it should not be added to this tree, please 
reply to this email.

For more information about the 3.13.y.z tree, see
https://wiki.ubuntu.com/Kernel/Dev/ExtendedStable

Thanks.
-Kamal

------

>From 29ae231327f2c2340979e19f97f5cf1fcd355cb7 Mon Sep 17 00:00:00 2001
From: Sagi Grimberg <sagig at mellanox.com>
Date: Wed, 2 Jul 2014 16:19:25 +0300
Subject: Target/iser: Don't put isert_conn inside disconnected handler

commit 0fc4ea701fcf5bc51ace4e288af5be741465f776 upstream.

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 at mellanox.com>
Signed-off-by: Nicholas Bellinger <nab at linux-iscsi.org>
Signed-off-by: Kamal Mostafa <kamal at canonical.com>
---
 drivers/infiniband/ulp/isert/ib_isert.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/infiniband/ulp/isert/ib_isert.c b/drivers/infiniband/ulp/isert/ib_isert.c
index a4210f9..44b883f 100644
--- a/drivers/infiniband/ulp/isert/ib_isert.c
+++ b/drivers/infiniband/ulp/isert/ib_isert.c
@@ -695,7 +695,6 @@ isert_disconnect_work(struct work_struct *work)

 wake_up:
 	complete(&isert_conn->conn_wait);
-	isert_put_conn(isert_conn);
 }

 static void
@@ -2777,6 +2776,7 @@ static void isert_wait_conn(struct iscsi_conn *conn)
 	wait_for_completion(&isert_conn->conn_wait_comp_err);

 	wait_for_completion(&isert_conn->conn_wait);
+	isert_put_conn(isert_conn);
 }

 static void isert_free_conn(struct iscsi_conn *conn)
--
1.9.1





More information about the kernel-team mailing list