From: "Nicholas A. Bellinger" <nab@linux-iscsi.org>
To: target-devel <target-devel@vger.kernel.org>,
linux-scsi <linux-scsi@vger.kernel.org>
Cc: Roland Dreier <roland@purestorage.com>,
Nicholas Bellinger <nab@linux-iscsi.org>
Subject: [PATCH 3/4] target: Fix transport_cmd_finish_abort queue removal bug
Date: Fri, 30 Sep 2011 04:55:10 +0000 [thread overview]
Message-ID: <1317358511-10664-4-git-send-email-nab@linux-iscsi.org> (raw)
In-Reply-To: <1317358511-10664-1-git-send-email-nab@linux-iscsi.org>
From: Nicholas Bellinger <nab@linux-iscsi.org>
This patch fixes a bug in LUN_RESET operation with transport_cmd_finish_abort()
where transport_remove_cmd_from_queue() was incorrectly being called, causing
descriptors with t_state == TRANSPORT_FREE_CMD_INTR to be incorrectly removed
from qobj->qobj_list during process context release. This change ensures the
descriptor is only removed via transport_remove_cmd_from_queue() when doing a
direct release via transport_generic_remove().
Signed-off-by: Nicholas Bellinger <nab@risingtidesystems.com>
---
drivers/target/target_core_transport.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/target/target_core_transport.c b/drivers/target/target_core_transport.c
index 86470b7..33fcb6f 100644
--- a/drivers/target/target_core_transport.c
+++ b/drivers/target/target_core_transport.c
@@ -597,13 +597,14 @@ check_lun:
void transport_cmd_finish_abort(struct se_cmd *cmd, int remove)
{
- transport_remove_cmd_from_queue(cmd, &cmd->se_dev->dev_queue_obj);
transport_lun_remove_cmd(cmd);
if (transport_cmd_check_stop_to_fabric(cmd))
return;
- if (remove)
+ if (remove) {
+ transport_remove_cmd_from_queue(cmd, &cmd->se_dev->dev_queue_obj);
transport_generic_remove(cmd, 0);
+ }
}
void transport_cmd_finish_abort_tmr(struct se_cmd *cmd)
--
1.7.2.5
next prev parent reply other threads:[~2011-09-30 4:55 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-09-30 4:55 [PATCH 0/4] target: LUN_RESET bugfixes for HW target mode Nicholas A. Bellinger
2011-09-30 4:55 ` [PATCH 1/4] target: Prevent cmd->se_queue_node double add Nicholas A. Bellinger
2011-10-09 1:24 ` Christoph Hellwig
2011-09-30 4:55 ` [PATCH 2/4] target: Re-org of core_tmr_lun_reset + FREE_CMD_INTR bugfix Nicholas A. Bellinger
2011-10-09 1:30 ` Christoph Hellwig
2011-10-09 2:00 ` Nicholas A. Bellinger
2011-09-30 4:55 ` Nicholas A. Bellinger [this message]
2011-10-09 1:33 ` [PATCH 3/4] target: Fix transport_cmd_finish_abort queue removal bug Christoph Hellwig
2011-10-09 2:03 ` Nicholas A. Bellinger
2011-10-09 2:27 ` Christoph Hellwig
2011-10-09 9:06 ` Nicholas A. Bellinger
2011-09-30 4:55 ` [PATCH 4/4] target: Prevent transport_send_task_abort when CHECK_CONDITION status Nicholas A. Bellinger
2011-09-30 5:25 ` [PATCH 0/4] target: LUN_RESET bugfixes for HW target mode Nicholas A. Bellinger
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=1317358511-10664-4-git-send-email-nab@linux-iscsi.org \
--to=nab@linux-iscsi.org \
--cc=linux-scsi@vger.kernel.org \
--cc=roland@purestorage.com \
--cc=target-devel@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.