Patch "target: Set CMD_T_ACTIVE bit for Task Management Requests" has been added to the 3.10-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.10-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.10 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.


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

From: Nicholas Bellinger <nab@xxxxxxxxxxxxxxx>

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 <thomas@xxxxxxxxxxxx>
Cc: Charalampos Pournaris <charpour@xxxxxxxxx>
Signed-off-by: Nicholas Bellinger <nab@xxxxxxxxxxxxxxx>
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>

---
 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
@@ -2877,6 +2877,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 nab@xxxxxxxxxxxxxxx are

queue-3.10/target-report-correct-response-length-for-some-commands.patch
queue-3.10/target-iser-fix-hangs-in-connection-teardown.patch
queue-3.10/target-iser-bail-from-accept_np-if-np_thread-is-trying-to-close.patch
queue-3.10/target-use-complete_all-for-se_cmd-t_transport_stop_comp.patch
queue-3.10/target-set-cmd_t_active-bit-for-task-management-requests.patch
queue-3.10/scsi_cmnd-introduce-scsi_transfer_length-helper.patch
queue-3.10/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 majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]