From: Vladislav Bolkhovitin <vst@vlnb.net>
To: linux-scsi@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, scst-devel@lists.sourceforge.net
Subject: [PATCH][iSCSI-SCST]: Fix list corruption if SCST target registration fails
Date: Fri, 30 Jan 2009 21:20:16 +0300 [thread overview]
Message-ID: <498344E0.6000304@vlnb.net> (raw)
This patch fixes list corruption if SCST target registration fails.
Signed-off-by: Arne Redlich <agr@powerkom-dd.de>
Signed-off-by: Vladislav Bolkhovitin <vst@vlnb.net>
target.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
Index: iscsi-scst/kernel/target.c
===================================================================
--- iscsi-scst/kernel/target.c (revision 648)
+++ iscsi-scst/kernel/target.c (working copy)
@@ -116,8 +116,6 @@ static int iscsi_target_create(struct ta
mutex_init(&target->target_mutex);
INIT_LIST_HEAD(&target->session_list);
- list_add(&target->target_list_entry, &target_list);
-
target->scst_tgt = scst_register(&iscsi_template, target->name);
if (!target->scst_tgt) {
PRINT_ERROR("%s", "scst_register() failed");
@@ -125,6 +123,8 @@ static int iscsi_target_create(struct ta
goto out_free;
}
+ list_add(&target->target_list_entry, &target_list);
+
return 0;
out_free:
reply other threads:[~2009-01-30 18:20 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=498344E0.6000304@vlnb.net \
--to=vst@vlnb.net \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=scst-devel@lists.sourceforge.net \
/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
Powered by JetHome