diff options
Diffstat (limited to 'net/tls/tls_device.c')
-rw-r--r-- | net/tls/tls_device.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/net/tls/tls_device.c b/net/tls/tls_device.c index 7c0b2b778703..43922d86e510 100644 --- a/net/tls/tls_device.c +++ b/net/tls/tls_device.c | |||
@@ -373,9 +373,9 @@ static int tls_push_data(struct sock *sk, | |||
373 | struct tls_context *tls_ctx = tls_get_ctx(sk); | 373 | struct tls_context *tls_ctx = tls_get_ctx(sk); |
374 | struct tls_prot_info *prot = &tls_ctx->prot_info; | 374 | struct tls_prot_info *prot = &tls_ctx->prot_info; |
375 | struct tls_offload_context_tx *ctx = tls_offload_ctx_tx(tls_ctx); | 375 | struct tls_offload_context_tx *ctx = tls_offload_ctx_tx(tls_ctx); |
376 | int tls_push_record_flags = flags | MSG_SENDPAGE_NOTLAST; | ||
377 | int more = flags & (MSG_SENDPAGE_NOTLAST | MSG_MORE); | 376 | int more = flags & (MSG_SENDPAGE_NOTLAST | MSG_MORE); |
378 | struct tls_record_info *record = ctx->open_record; | 377 | struct tls_record_info *record = ctx->open_record; |
378 | int tls_push_record_flags; | ||
379 | struct page_frag *pfrag; | 379 | struct page_frag *pfrag; |
380 | size_t orig_size = size; | 380 | size_t orig_size = size; |
381 | u32 max_open_record_len; | 381 | u32 max_open_record_len; |
@@ -390,6 +390,9 @@ static int tls_push_data(struct sock *sk, | |||
390 | if (sk->sk_err) | 390 | if (sk->sk_err) |
391 | return -sk->sk_err; | 391 | return -sk->sk_err; |
392 | 392 | ||
393 | flags |= MSG_SENDPAGE_DECRYPTED; | ||
394 | tls_push_record_flags = flags | MSG_SENDPAGE_NOTLAST; | ||
395 | |||
393 | timeo = sock_sndtimeo(sk, flags & MSG_DONTWAIT); | 396 | timeo = sock_sndtimeo(sk, flags & MSG_DONTWAIT); |
394 | if (tls_is_partially_sent_record(tls_ctx)) { | 397 | if (tls_is_partially_sent_record(tls_ctx)) { |
395 | rc = tls_push_partial_record(sk, tls_ctx, flags); | 398 | rc = tls_push_partial_record(sk, tls_ctx, flags); |
@@ -576,7 +579,9 @@ void tls_device_write_space(struct sock *sk, struct tls_context *ctx) | |||
576 | gfp_t sk_allocation = sk->sk_allocation; | 579 | gfp_t sk_allocation = sk->sk_allocation; |
577 | 580 | ||
578 | sk->sk_allocation = GFP_ATOMIC; | 581 | sk->sk_allocation = GFP_ATOMIC; |
579 | tls_push_partial_record(sk, ctx, MSG_DONTWAIT | MSG_NOSIGNAL); | 582 | tls_push_partial_record(sk, ctx, |
583 | MSG_DONTWAIT | MSG_NOSIGNAL | | ||
584 | MSG_SENDPAGE_DECRYPTED); | ||
580 | sk->sk_allocation = sk_allocation; | 585 | sk->sk_allocation = sk_allocation; |
581 | } | 586 | } |
582 | } | 587 | } |