[PATCH 5/8] [LIO-Target]: Add transport_free_session() in iscsi_target_login_thread() exception path

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



>From 5717324513c2db0000d15af92083614aa28cee8b Mon Sep 17 00:00:00 2001
From: Nicholas Bellinger <nab@xxxxxxxxxxxxxxx>
Date: Sat, 20 Dec 2008 02:55:22 -0800
Subject: [PATCH 5/8] [LIO-Target]: Add transport_free_session() in iscsi_target_login_thread() exception path

This patch adds transport_free_session() usage to iscsi_target_login_thread():new_sess_out
label to properly release the iscsi_session_t->se_sess allocated in iscsi_login_zero_tsih_s1()
with transport_init_session().

Signed-off-by: Nicholas A. Bellinger <nab@xxxxxxxxxxxxxxx>
---
 drivers/lio-core/iscsi_target_login.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/drivers/lio-core/iscsi_target_login.c b/drivers/lio-core/iscsi_target_login.c
index 40d9b65..53c4ae5 100644
--- a/drivers/lio-core/iscsi_target_login.c
+++ b/drivers/lio-core/iscsi_target_login.c
@@ -1240,7 +1240,8 @@ new_sess_out:
 
 	if (!zero_tsih || !SESS(conn))
 		goto old_sess_out;
-
+	if (SESS(conn)->se_sess)
+		transport_free_session(SESS(conn)->se_sess);
 	if (SESS(conn)->sess_ops)
 		kfree(SESS(conn)->sess_ops);
 	if (SESS(conn))
-- 
1.5.4.1



--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux