target: Set CMD_T_ACTIVE bit for Task Management Requests
authorNicholas Bellinger <nab@linux-iscsi.org>
Mon, 9 Jun 2014 23:13:20 +0000 (23:13 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 1 Jul 2014 03:09:44 +0000 (20:09 -0700)
commit7f2a9059e6f1ad09e59b098f9096068c4b2288c0
treecd8e9fbc90250c56eb9917c695e3a23848557599
parent1813e80ef7833579ba7a802781a66361a3d8906d
target: Set CMD_T_ACTIVE bit for Task Management Requests

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@glanzmann.de>
Cc: Charalampos Pournaris <charpour@gmail.com>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/target/target_core_transport.c