diff options
Diffstat (limited to 'net/tls/tls_main.c')
-rw-r--r-- | net/tls/tls_main.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/net/tls/tls_main.c b/net/tls/tls_main.c index fc81ae18cc44..e2b69e805d46 100644 --- a/net/tls/tls_main.c +++ b/net/tls/tls_main.c | |||
@@ -279,7 +279,8 @@ static void tls_sk_proto_close(struct sock *sk, long timeout) | |||
279 | goto skip_tx_cleanup; | 279 | goto skip_tx_cleanup; |
280 | } | 280 | } |
281 | 281 | ||
282 | if (!tls_complete_pending_work(sk, ctx, 0, &timeo)) | 282 | if (unlikely(sk->sk_write_pending) && |
283 | !wait_on_pending_writer(sk, &timeo)) | ||
283 | tls_handle_open_record(sk, 0); | 284 | tls_handle_open_record(sk, 0); |
284 | 285 | ||
285 | /* We need these for tls_sw_fallback handling of other packets */ | 286 | /* We need these for tls_sw_fallback handling of other packets */ |