aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/target
diff options
context:
space:
mode:
authorSteve Hodgson <steve@purestorage.com>2012-10-31 13:24:02 -0400
committerNicholas Bellinger <nab@linux-iscsi.org>2012-11-01 03:38:45 -0400
commitab74b3d62f05192bf8fb8f169e7999d1183b2e08 (patch)
tree854a0c02ec42a9f5b84ca9eafa989b8c809ac51b /drivers/target
parentd5627acba9ae584cf4928af19f7ddf5f6837de32 (diff)
target: Fix incorrect usage of nested IRQ spinlocks in ABORT_TASK path
This patch changes core_tmr_abort_task() to use spin_lock -> spin_unlock around se_cmd->t_state_lock while spin_lock_irqsave is held via se_sess->sess_cmd_lock. Signed-off-by: Steve Hodgson <steve@purestorage.com> Signed-off-by: Roland Dreier <roland@purestorage.com> Cc: stable@vger.kernel.org Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Diffstat (limited to 'drivers/target')
-rw-r--r--drivers/target/target_core_tmr.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/target/target_core_tmr.c b/drivers/target/target_core_tmr.c
index 1c59a3c23b2c..be75c4331a92 100644
--- a/drivers/target/target_core_tmr.c
+++ b/drivers/target/target_core_tmr.c
@@ -140,15 +140,15 @@ void core_tmr_abort_task(
140 printk("ABORT_TASK: Found referenced %s task_tag: %u\n", 140 printk("ABORT_TASK: Found referenced %s task_tag: %u\n",
141 se_cmd->se_tfo->get_fabric_name(), ref_tag); 141 se_cmd->se_tfo->get_fabric_name(), ref_tag);
142 142
143 spin_lock_irq(&se_cmd->t_state_lock); 143 spin_lock(&se_cmd->t_state_lock);
144 if (se_cmd->transport_state & CMD_T_COMPLETE) { 144 if (se_cmd->transport_state & CMD_T_COMPLETE) {
145 printk("ABORT_TASK: ref_tag: %u already complete, skipping\n", ref_tag); 145 printk("ABORT_TASK: ref_tag: %u already complete, skipping\n", ref_tag);
146 spin_unlock_irq(&se_cmd->t_state_lock); 146 spin_unlock(&se_cmd->t_state_lock);
147 spin_unlock_irqrestore(&se_sess->sess_cmd_lock, flags); 147 spin_unlock_irqrestore(&se_sess->sess_cmd_lock, flags);
148 goto out; 148 goto out;
149 } 149 }
150 se_cmd->transport_state |= CMD_T_ABORTED; 150 se_cmd->transport_state |= CMD_T_ABORTED;
151 spin_unlock_irq(&se_cmd->t_state_lock); 151 spin_unlock(&se_cmd->t_state_lock);
152 152
153 list_del_init(&se_cmd->se_cmd_list); 153 list_del_init(&se_cmd->se_cmd_list);
154 kref_get(&se_cmd->cmd_kref); 154 kref_get(&se_cmd->cmd_kref);