From 73b50bce1b184d7865093a150e0c062be6f5e6f2 Mon Sep 17 00:00:00 2001 From: Israel Rukshin Date: Wed, 17 Aug 2016 07:28:38 +0000 Subject: [PATCH] isert: fix working with freed conn object isert_delete_conn_dev function checks if it needs to close the connection by checking that dev conn is not NULL. We were missing set conn to null when freeing it and that caused working with memory that was already freed. Signed-off-by: Israel Rukshin git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6955 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- iscsi-scst/kernel/isert-scst/isert_login.c | 1 + 1 file changed, 1 insertion(+) diff --git a/iscsi-scst/kernel/isert-scst/isert_login.c b/iscsi-scst/kernel/isert-scst/isert_login.c index 2956f5236..c43193bc4 100644 --- a/iscsi-scst/kernel/isert-scst/isert_login.c +++ b/iscsi-scst/kernel/isert-scst/isert_login.c @@ -453,6 +453,7 @@ static void isert_dev_disconnect(struct iscsi_conn* iscsi_conn) if (dev) { isert_del_timer(dev); dev->state = CS_DISCONNECTED; + dev->conn = NULL; if (dev->login_req) { isert_task_abort(dev->login_req); spin_lock(&dev->pdu_lock);