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 2/8] [LIO-Target]: Properly release se_cmd_t w/ CHECK_CONDITION exception during iSCSI session recovery
Date: Sat, 20 Dec 2008 15:06:15 -0800 [thread overview]
Message-ID: <1229814375.4560.210.camel@haakon2.linux-iscsi.org> (raw)
>From c7e5c1224267c6eac41863b78d0a907dc55944be Mon Sep 17 00:00:00 2001
From: Nicholas Bellinger <nab@linux-iscsi.org>
Date: Sat, 20 Dec 2008 02:05:54 -0800
Subject: [PATCH 2/8] [LIO-Target]: Properly release se_cmd_t w/ CHECK_CONDITION exception during iSCSI session recovery
This patch fixes v3.0 breakage that was leaking a se_cmd_t w/ CHECK_CONDITION
after hitting a NON_EXISTENT se_lun_t exception. This patch adds the special
case in iscsi_release_commands_from_conn() and calls transport_release_cmd_to_pool()
on the se_cmd_t in question.
Signed-off-by: Nicholas A. Bellinger <nab@linux-iscsi.org>
---
drivers/lio-core/iscsi_target.c | 9 ++++++++-
1 files changed, 8 insertions(+), 1 deletions(-)
diff --git a/drivers/lio-core/iscsi_target.c b/drivers/lio-core/iscsi_target.c
index d234fe0..d705871 100644
--- a/drivers/lio-core/iscsi_target.c
+++ b/drivers/lio-core/iscsi_target.c
@@ -4744,7 +4744,14 @@ static void iscsi_release_commands_from_conn (iscsi_conn_t *conn)
spin_unlock_bh(&conn->cmd_lock);
iscsi_increment_maxcmdsn(cmd, sess);
- __iscsi_release_cmd_to_pool(cmd, sess);
+ /*
+ * Special case for transport_get_lun_for_cmd() failing
+ * from iscsi_get_lun_for_cmd() in iscsi_handle_scsi_cmd().
+ */
+ if (SE_CMD(cmd))
+ transport_release_cmd_to_pool(SE_CMD(cmd));
+ else
+ __iscsi_release_cmd_to_pool(cmd, sess);
spin_lock_bh(&conn->cmd_lock);
cmd = cmd_next;
--
1.5.4.1
reply other threads:[~2008-12-20 23:13 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=1229814375.4560.210.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®