aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicholas Bellinger <nab@linux-iscsi.org>2012-01-16 17:11:54 -0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-02-13 11:16:59 -0800
commit49f4afd3b15866b16b72691a6060fad041e8f2dc (patch)
tree7b22dae41402e19dae9e316b894d3a4f57e9759e
parentfa577fc1c4b43933b74efe8d44075ef93f289516 (diff)
iscsi-target: Fix double list_add with iscsit_alloc_buffs reject
commit cd931ee62fd0258fc85c76a7c5499fe85e0f3436 upstream. This patch fixes a bug where the iscsit_add_reject_from_cmd() call from a failure to iscsit_alloc_buffs() was incorrectly passing add_to_conn=1 and causing a double list_add after iscsi_cmd->i_list had already been added in iscsit_handle_scsi_cmd(). Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/target/iscsi/iscsi_target.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/target/iscsi/iscsi_target.c b/drivers/target/iscsi/iscsi_target.c
index 8599545cdf9..3b46e3a692c 100644
--- a/drivers/target/iscsi/iscsi_target.c
+++ b/drivers/target/iscsi/iscsi_target.c
@@ -1062,7 +1062,7 @@ attach_cmd:
if (ret < 0)
return iscsit_add_reject_from_cmd(
ISCSI_REASON_BOOKMARK_NO_RESOURCES,
- 1, 1, buf, cmd);
+ 1, 0, buf, cmd);
/*
* Check the CmdSN against ExpCmdSN/MaxCmdSN here if
* the Immediate Bit is not set, and no Immediate