Netdev List
 help / color / mirror / Atom feed
From: Andre Tomt <andre@tomt.net>
To: "David S . Miller" <davem@davemloft.net>,
	netdev@vger.kernel.org, borisp@mellanox.com,
	Aviad Yehezkel <aviadye@mellanox.com>,
	Dave Watson <davejwatson@fb.com>
Cc: Andre Tomt <andre@tomt.net>
Subject: [PATCH net] net/tls: Fix connection stall on partial tls record
Date: Mon,  7 May 2018 04:24:39 +0200	[thread overview]
Message-ID: <20180507022439.265020-1-andre@tomt.net> (raw)

In the case of writing a partial tls record we forgot to clear the
ctx->in_tcp_sendpages flag, causing some connections to stall.

Fixes: c212d2c7fc47 ("net/tls: Don't recursively call push_record during tls_write_space callbacks")
Signed-off-by: Andre Tomt <andre@tomt.net>
---
 net/tls/tls_main.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/net/tls/tls_main.c b/net/tls/tls_main.c
index cc03e00785c7..a02ebdfa0675 100644
--- a/net/tls/tls_main.c
+++ b/net/tls/tls_main.c
@@ -135,6 +135,7 @@ int tls_push_sg(struct sock *sk,
 			offset -= sg->offset;
 			ctx->partially_sent_offset = offset;
 			ctx->partially_sent_record = (void *)sg;
+			ctx->in_tcp_sendpages = false;
 			return ret;
 		}
 
-- 
2.17.0

             reply	other threads:[~2018-05-07  2:25 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-07  2:24 Andre Tomt [this message]
2018-05-08  3:49 ` [PATCH net] net/tls: Fix connection stall on partial tls record David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180507022439.265020-1-andre@tomt.net \
    --to=andre@tomt.net \
    --cc=aviadye@mellanox.com \
    --cc=borisp@mellanox.com \
    --cc=davejwatson@fb.com \
    --cc=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox