File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -2672,6 +2672,10 @@ static void xs_tcp_tls_setup_socket(struct work_struct *work)
2672
2672
rcu_read_lock ();
2673
2673
lower_xprt = rcu_dereference (lower_clnt -> cl_xprt );
2674
2674
rcu_read_unlock ();
2675
+
2676
+ if (wait_on_bit_lock (& lower_xprt -> state , XPRT_LOCKED , TASK_KILLABLE ))
2677
+ goto out_unlock ;
2678
+
2675
2679
status = xs_tls_handshake_sync (lower_xprt , & upper_xprt -> xprtsec );
2676
2680
if (status ) {
2677
2681
trace_rpc_tls_not_started (upper_clnt , upper_xprt );
@@ -2681,6 +2685,7 @@ static void xs_tcp_tls_setup_socket(struct work_struct *work)
2681
2685
status = xs_tcp_tls_finish_connecting (lower_xprt , upper_transport );
2682
2686
if (status )
2683
2687
goto out_close ;
2688
+ xprt_release_write (lower_xprt , NULL );
2684
2689
2685
2690
trace_rpc_socket_connect (upper_xprt , upper_transport -> sock , 0 );
2686
2691
if (!xprt_test_and_set_connected (upper_xprt )) {
@@ -2702,6 +2707,7 @@ static void xs_tcp_tls_setup_socket(struct work_struct *work)
2702
2707
return ;
2703
2708
2704
2709
out_close :
2710
+ xprt_release_write (lower_xprt , NULL );
2705
2711
rpc_shutdown_client (lower_clnt );
2706
2712
2707
2713
/* xprt_force_disconnect() wakes tasks with a fixed tk_status code.
You can’t perform that action at this time.
0 commit comments