From: "Nicholas A. Bellinger" <nab@linux-iscsi.org>
To: "Linux-iSCSI.org Target Dev" <linux-iscsi-target-dev@googlegroups.com>
Cc: LKML <linux-kernel@vger.kernel.org>,
linux-scsi <linux-scsi@vger.kernel.org>
Subject: [PATCH 5/8] [LIO-Target]: Add transport_free_session() in iscsi_target_login_thread() exception path
Date: Sat, 20 Dec 2008 15:02:13 -0800 [thread overview]
Message-ID: <1229814133.4560.202.camel@haakon2.linux-iscsi.org> (raw)
>From 5717324513c2db0000d15af92083614aa28cee8b Mon Sep 17 00:00:00 2001
From: Nicholas Bellinger <nab@linux-iscsi.org>
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@linux-iscsi.org>
---
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
reply other threads:[~2008-12-20 23:02 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1229814133.4560.202.camel@haakon2.linux-iscsi.org \
--to=nab@linux-iscsi.org \
--cc=linux-iscsi-target-dev@googlegroups.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®