File tree Expand file tree Collapse file tree 3 files changed +6
-0
lines changed Expand file tree Collapse file tree 3 files changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -3870,6 +3870,7 @@ int iscsi_target_tx_thread(void *arg)
38703870	 * connection recovery / failure event can be triggered externally. 
38713871	 */ 
38723872	allow_signal (SIGINT );
3873+ 	complete (& conn -> kthr_start_comp );
38733874
38743875	while  (!kthread_should_stop ()) {
38753876		/* 
@@ -4116,6 +4117,7 @@ int iscsi_target_rx_thread(void *arg)
41164117	 * connection recovery / failure event can be triggered externally. 
41174118	 */ 
41184119	allow_signal (SIGINT );
4120+ 	complete (& conn -> kthr_start_comp );
41194121	/* 
41204122	 * Wait for iscsi_post_login_handler() to complete before allowing 
41214123	 * incoming iscsi/tcp socket I/O, and/or failing the connection. 
Original file line number Diff line number Diff line change @@ -619,6 +619,7 @@ int iscsit_start_kthreads(struct iscsit_conn *conn)
619619		ret  =  PTR_ERR (conn -> tx_thread );
620620		goto out_bitmap ;
621621	}
622+ 	wait_for_completion (& conn -> kthr_start_comp );
622623	conn -> tx_thread_active  =  true;
623624
624625	conn -> rx_thread  =  kthread_run (iscsi_target_rx_thread , conn ,
@@ -628,6 +629,7 @@ int iscsit_start_kthreads(struct iscsit_conn *conn)
628629		ret  =  PTR_ERR (conn -> rx_thread );
629630		goto out_tx ;
630631	}
632+ 	wait_for_completion (& conn -> kthr_start_comp );
631633	conn -> rx_thread_active  =  true;
632634
633635	return  0 ;
@@ -1023,6 +1025,7 @@ static struct iscsit_conn *iscsit_alloc_conn(struct iscsi_np *np)
10231025	init_completion (& conn -> rx_half_close_comp );
10241026	init_completion (& conn -> tx_half_close_comp );
10251027	init_completion (& conn -> rx_login_comp );
1028+ 	init_completion (& conn -> kthr_start_comp );
10261029	spin_lock_init (& conn -> cmd_lock );
10271030	spin_lock_init (& conn -> conn_usage_lock );
10281031	spin_lock_init (& conn -> immed_queue_lock );
Original file line number Diff line number Diff line change @@ -550,6 +550,7 @@ struct iscsit_conn {
550550	struct  completion 	conn_logout_comp ;
551551	struct  completion 	tx_half_close_comp ;
552552	struct  completion 	rx_half_close_comp ;
553+ 	struct  completion 	kthr_start_comp ;
553554	/* socket used by this connection */ 
554555	struct  socket 		* sock ;
555556	void 			(* orig_data_ready )(struct  sock  * );
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments