diff options
Diffstat (limited to 'net/tls/tls_main.c')
-rw-r--r-- | net/tls/tls_main.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/net/tls/tls_main.c b/net/tls/tls_main.c index 93c0c225ab34..180b6640e531 100644 --- a/net/tls/tls_main.c +++ b/net/tls/tls_main.c | |||
@@ -213,9 +213,14 @@ static void tls_write_space(struct sock *sk) | |||
213 | { | 213 | { |
214 | struct tls_context *ctx = tls_get_ctx(sk); | 214 | struct tls_context *ctx = tls_get_ctx(sk); |
215 | 215 | ||
216 | /* We are already sending pages, ignore notification */ | 216 | /* If in_tcp_sendpages call lower protocol write space handler |
217 | if (ctx->in_tcp_sendpages) | 217 | * to ensure we wake up any waiting operations there. For example |
218 | * if do_tcp_sendpages where to call sk_wait_event. | ||
219 | */ | ||
220 | if (ctx->in_tcp_sendpages) { | ||
221 | ctx->sk_write_space(sk); | ||
218 | return; | 222 | return; |
223 | } | ||
219 | 224 | ||
220 | if (!sk->sk_write_pending && tls_is_pending_closed_record(ctx)) { | 225 | if (!sk->sk_write_pending && tls_is_pending_closed_record(ctx)) { |
221 | gfp_t sk_allocation = sk->sk_allocation; | 226 | gfp_t sk_allocation = sk->sk_allocation; |