target: Use complete_all for se_cmd->t_transport_stop_comp
authorNicholas Bellinger <nab@linux-iscsi.org>
Mon, 9 Jun 2014 23:36:51 +0000 (23:36 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 1 Jul 2014 03:09:45 +0000 (20:09 -0700)
commit01bdcde7f7ad3b2e6d5977e3fe4241885d76557d
tree9dab8f775af688510d005c3b247237a3490b05b9
parent7f2a9059e6f1ad09e59b098f9096068c4b2288c0
target: Use complete_all for se_cmd->t_transport_stop_comp

commit a95d6511303b848da45ee27b35018bb58087bdc6 upstream.

This patch fixes a bug where multiple waiters on ->t_transport_stop_comp
occurs due to a concurrent ABORT_TASK and session reset both invoking
transport_wait_for_tasks(), while waiting for the associated se_cmd
descriptor backend processing to complete.

For this case, complete_all() should be invoked in order to wake up
both waiters in core_tmr_abort_task() + transport_generic_free_cmd()
process contexts.

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