Re: [PATCH 2/2] iscsi target: wake up all session_wait_comp waiters

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

 



On 08/12/2017 05:30 PM, Mike Christie wrote:
> 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;
>  	}
> 

Nick, ignore this patch for now. The bug might only be in a distro
kernel and is not needed upstream.
--
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



[Index of Archives]     [Linux SCSI]     [Kernel Newbies]     [Linux SCSI Target Infrastructure]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Device Mapper]

  Powered by Linux