summaryrefslogtreecommitdiffstats
path: root/net/smc/smc_clc.c
diff options
context:
space:
mode:
authorDaniel Borkmann <daniel@iogearbox.net>2018-06-15 03:07:46 +0200
committerDavid S. Miller <davem@davemloft.net>2018-06-15 09:14:30 -0700
commit06030dbaf3b6c5801dcdb7fe4fbab3b91c8da84a (patch)
tree8b74374786d0408b81f5f42ed6cacc8f6d7fd3b9 /net/smc/smc_clc.c
parenta447da7d00410278c90d3576782a43f8b675d7be (diff)
downloadlinux-06030dbaf3b6c5801dcdb7fe4fbab3b91c8da84a.tar.bz2
tls: fix waitall behavior in tls_sw_recvmsg
Current behavior in tls_sw_recvmsg() is to wait for incoming tls messages and copy up to exactly len bytes of data that the user provided. This is problematic in the sense that i) if no packet is currently queued in strparser we keep waiting until one has been processed and pushed into tls receive layer for tls_wait_data() to wake up and push the decrypted bits to user space. Given after tls decryption, we're back at streaming data, use sock_rcvlowat() hint from tcp socket instead. Retain current behavior with MSG_WAITALL flag and otherwise use the hint target for breaking the loop and returning to application. This is done if currently no ctx->recv_pkt is ready, otherwise continue to process it from our strparser backlog. Fixes: c46234ebb4d1 ("tls: RX path for ktls") Signed-off-by: Daniel Borkmann <daniel@iogearbox.net> Acked-by: Dave Watson <davejwatson@fb.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/smc/smc_clc.c')
0 files changed, 0 insertions, 0 deletions