net/tls: avoid TCP window full during ->read_sock()
authorHannes Reinecke <hare@suse.de>
Mon, 7 Aug 2023 07:10:22 +0000 (09:10 +0200)
committerJakub Kicinski <kuba@kernel.org>
Tue, 8 Aug 2023 22:53:49 +0000 (15:53 -0700)
commitba4a734e1aa073b06412fc80ad81b54c4644d093
treeef3e519258fc15b5e1280de3fa7ed083f543d592
parent794529c448008d8bc24d6e06c7528b7dbec99dfd
net/tls: avoid TCP window full during ->read_sock()

When flushing the backlog after decoding a record we don't really
know how much data the caller want us to evaluate, so use INT_MAX
and 0 as arguments to tls_read_flush_backlog() to ensure we flush
at 128k of data. Otherwise we might be reading too much data and
trigger a TCP window full.

Suggested-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Hannes Reinecke <hare@suse.de>
Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
Link: https://lore.kernel.org/r/20230807071022.10091-1-hare@suse.de
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
net/tls/tls_sw.c