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: d829e9c4112b ("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
..
2018-10-23 10:57:06 -07:00
2018-07-24 14:10:42 -07:00
2018-10-22 19:59:20 -07:00
2018-12-21 09:11:25 -08:00
2018-12-19 20:53:18 -08:00
2018-11-15 11:35:40 -08:00
2018-07-24 14:10:42 -07:00
2018-11-29 14:25:36 -08:00