WSL2-Linux-Kernel/net/tls
Vakul Garg 65a10e28ae tls: Do not call sk_memcopy_from_iter with zero length
In some conditions e.g. when tls_clone_plaintext_msg() returns -ENOSPC,
the number of bytes to be copied using subsequent function
sk_msg_memcopy_from_iter() becomes zero. This causes function
sk_msg_memcopy_from_iter() to fail which in turn causes tls_sw_sendmsg()
to return failure. To prevent it, do not call sk_msg_memcopy_from_iter()
when number of bytes to copy (indicated by 'try_to_copy') is zero.

Fixes: d829e9c411 ("tls: convert to generic sk_msg interface")
Signed-off-by: Vakul Garg <vakul.garg@nxp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2018-12-21 10:26:54 -08:00
..
Kconfig tls: convert to generic sk_msg interface 2018-10-15 12:23:19 -07:00
Makefile net/tls: Add generic NIC offload infrastructure 2018-05-01 09:42:47 -04:00
tls_device.c iov_iter: Separate type from direction and use accessor functions 2018-10-24 00:41:07 +01:00
tls_device_fallback.c tls: zero the crypto information from tls_context before freeing 2018-09-13 12:03:47 -07:00
tls_main.c net/tls: allocate tls context using GFP_ATOMIC 2018-12-19 16:28:50 -08:00
tls_sw.c tls: Do not call sk_memcopy_from_iter with zero length 2018-12-21 10:26:54 -08:00