This is a note to let you know that I've just added the patch titled

    target: Set CMD_T_ACTIVE bit for Task Management Requests

to the 3.14-stable tree which can be found at:
    
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     target-set-cmd_t_active-bit-for-task-management-requests.patch
and it can be found in the queue-3.14 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <[email protected]> know about it.


>From f15e9cd910c4d9da7de43f2181f362082fc45f0f Mon Sep 17 00:00:00 2001
From: Nicholas Bellinger <[email protected]>
Date: Mon, 9 Jun 2014 23:13:20 +0000
Subject: target: Set CMD_T_ACTIVE bit for Task Management Requests

From: Nicholas Bellinger <[email protected]>

commit f15e9cd910c4d9da7de43f2181f362082fc45f0f upstream.

This patch fixes a bug where se_cmd descriptors associated with a
Task Management Request (TMR) where not setting CMD_T_ACTIVE before
being dispatched into target_tmr_work() process context.

This is required in order for transport_generic_free_cmd() ->
transport_wait_for_tasks() to wait on se_cmd->t_transport_stop_comp
if a session reset event occurs while an ABORT_TASK is outstanding
waiting for another I/O to complete.

Cc: Thomas Glanzmann <[email protected]>
Cc: Charalampos Pournaris <[email protected]>
Signed-off-by: Nicholas Bellinger <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>

---
 drivers/target/target_core_transport.c |    6 ++++++
 1 file changed, 6 insertions(+)

--- a/drivers/target/target_core_transport.c
+++ b/drivers/target/target_core_transport.c
@@ -2868,6 +2868,12 @@ static void target_tmr_work(struct work_
 int transport_generic_handle_tmr(
        struct se_cmd *cmd)
 {
+       unsigned long flags;
+
+       spin_lock_irqsave(&cmd->t_state_lock, flags);
+       cmd->transport_state |= CMD_T_ACTIVE;
+       spin_unlock_irqrestore(&cmd->t_state_lock, flags);
+
        INIT_WORK(&cmd->work, target_tmr_work);
        queue_work(cmd->se_dev->tmr_wq, &cmd->work);
        return 0;


Patches currently in stable-queue which might be from [email protected] are

queue-3.14/target-report-correct-response-length-for-some-commands.patch
queue-3.14/target-iser-fix-hangs-in-connection-teardown.patch
queue-3.14/target-iscsi-fix-sendtargets-response-pdu-for-iser-transport.patch
queue-3.14/target-iser-bail-from-accept_np-if-np_thread-is-trying-to-close.patch
queue-3.14/target-use-complete_all-for-se_cmd-t_transport_stop_comp.patch
queue-3.14/target-set-cmd_t_active-bit-for-task-management-requests.patch
queue-3.14/target-iser-wait-for-proper-cleanup-before-unloading.patch
queue-3.14/target-iser-improve-cm-events-handling.patch
queue-3.14/iscsi-target-fix-abort_task-connection-reset-iscsi_queue_req-memory-leak.patch
--
To unsubscribe from this list: send the line "unsubscribe stable" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to