summaryrefslogtreecommitdiff
path: root/include/video
diff options
context:
space:
mode:
authorVakul Garg <vakul.garg@nxp.com>2018-09-06 19:11:40 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-09-26 09:37:58 +0300
commit04f625fc5a68905f47349ec54538eff5523f29a5 (patch)
tree5c26d40ec6be4ce3cde030e9c0662a8fc1b3d41e /include/video
parent1de5a956681d09a1c64d569bf5c799ba1e645522 (diff)
downloadlinux-04f625fc5a68905f47349ec54538eff5523f29a5.tar.xz
net/tls: Set count of SG entries if sk_alloc_sg returns -ENOSPC
[ Upstream commit 52ea992cfac357b73180d5c051dca43bc8d20c2a ] tls_sw_sendmsg() allocates plaintext and encrypted SG entries using function sk_alloc_sg(). In case the number of SG entries hit MAX_SKB_FRAGS, sk_alloc_sg() returns -ENOSPC and sets the variable for current SG index to '0'. This leads to calling of function tls_push_record() with 'sg_encrypted_num_elem = 0' and later causes kernel crash. To fix this, set the number of SG elements to the number of elements in plaintext/encrypted SG arrays in case sk_alloc_sg() returns -ENOSPC. Fixes: 3c4d7559159b ("tls: kernel TLS support") Signed-off-by: Vakul Garg <vakul.garg@nxp.com> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include/video')
0 files changed, 0 insertions, 0 deletions