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)
committerNicholas Bellinger <nab@linux-iscsi.org>
Tue, 10 Jun 2014 04:19:31 +0000 (04:19 +0000)
commita95d6511303b848da45ee27b35018bb58087bdc6
treeeefd06649a284d2c84db54e423488ce55b1c59f2
parentf15e9cd910c4d9da7de43f2181f362082fc45f0f
target: Use complete_all for se_cmd->t_transport_stop_comp

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>
Cc: stable@vger.kernel.org # 3.10+
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
drivers/target/target_core_transport.c