aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/target
diff options
context:
space:
mode:
authorNicholas Bellinger <nab@linux-iscsi.org>2011-09-29 04:01:35 -0400
committerNicholas Bellinger <nab@linux-iscsi.org>2011-10-23 23:20:01 -0400
commit77039d1eafbbc192df71ee84b157b8973766737d (patch)
treec2066c32153765fa1a605d02ec1861dd6ee85ec5 /drivers/target
parentb0e062aec578c756d1aea4b5809294488366a6e8 (diff)
target: Fix transport_cmd_finish_abort queue removal bug
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(). Cc: stable@kernel.org Signed-off-by: Nicholas Bellinger <nab@risingtidesystems.com>
Diffstat (limited to 'drivers/target')
-rw-r--r--drivers/target/target_core_transport.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/target/target_core_transport.c b/drivers/target/target_core_transport.c
index 046da7f3823..009547b3557 100644
--- a/drivers/target/target_core_transport.c
+++ b/drivers/target/target_core_transport.c
@@ -593,13 +593,14 @@ check_lun:
593 593
594void transport_cmd_finish_abort(struct se_cmd *cmd, int remove) 594void transport_cmd_finish_abort(struct se_cmd *cmd, int remove)
595{ 595{
596 transport_remove_cmd_from_queue(cmd, &cmd->se_dev->dev_queue_obj);
597 transport_lun_remove_cmd(cmd); 596 transport_lun_remove_cmd(cmd);
598 597
599 if (transport_cmd_check_stop_to_fabric(cmd)) 598 if (transport_cmd_check_stop_to_fabric(cmd))
600 return; 599 return;
601 if (remove) 600 if (remove) {
601 transport_remove_cmd_from_queue(cmd, &cmd->se_dev->dev_queue_obj);
602 transport_generic_remove(cmd, 0); 602 transport_generic_remove(cmd, 0);
603 }
603} 604}
604 605
605void transport_cmd_finish_abort_tmr(struct se_cmd *cmd) 606void transport_cmd_finish_abort_tmr(struct se_cmd *cmd)