If userspace is disabling a tpg via the tpg enable configfs file and the initiator or target decides to drop the iscsi session, then we can end up where only one thread waiting on session_wait_comp will be woken up. This can then lead to the app doing the disable to hang if it was the one that did not get notified. Signed-off-by: Mike Christie <mchristi@xxxxxxxxxx> --- drivers/target/iscsi/iscsi_target.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/target/iscsi/iscsi_target.c b/drivers/target/iscsi/iscsi_target.c index 5001261..e1e0e25 100644 --- a/drivers/target/iscsi/iscsi_target.c +++ b/drivers/target/iscsi/iscsi_target.c @@ -4318,7 +4318,7 @@ int iscsit_close_connection( spin_unlock_bh(&sess->conn_lock); if (atomic_read(&sess->sleep_on_sess_wait_comp)) - complete(&sess->session_wait_comp); + complete_all(&sess->session_wait_comp); return 0; } else { @@ -4332,7 +4332,7 @@ int iscsit_close_connection( spin_unlock_bh(&sess->conn_lock); if (atomic_read(&sess->sleep_on_sess_wait_comp)) - complete(&sess->session_wait_comp); + complete_all(&sess->session_wait_comp); return 0; } -- 2.7.2 -- To unsubscribe from this list: send the line "unsubscribe target-devel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html