Vakul Garg
52ea992cfa
net/tls: Set count of SG entries if sk_alloc_sg returns -ENOSPC
...
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: 3c4d755915 ("tls: kernel TLS support")
Signed-off-by: Vakul Garg <vakul.garg@nxp.com >
Signed-off-by: David S. Miller <davem@davemloft.net >
2018-09-09 08:10:01 -07:00
..
2018-07-06 12:32:12 +02:00
2018-08-17 17:27:58 -07:00
2017-11-21 15:57:07 -08:00
2018-07-24 14:10:43 -07:00
2018-06-28 10:40:47 -07:00
2018-08-15 15:04:25 -07:00
2018-07-24 14:10:42 -07:00
2018-07-20 21:17:12 -07:00
2018-08-15 15:04:25 -07:00
2018-08-03 00:47:32 +02:00
2018-08-15 15:04:25 -07:00
2018-08-06 10:33:44 -07:00
2018-07-30 09:10:25 -07:00
2018-06-28 10:40:47 -07:00
2018-08-13 17:55:44 +02:00
2018-09-07 23:11:06 -07:00
2018-07-27 13:17:50 -07:00
2018-08-09 11:52:36 -07:00
2018-08-09 14:11:24 -07:00
2018-07-24 14:10:43 -07:00
2018-08-27 15:24:33 -07:00
2018-06-26 11:33:04 +09:00
2017-10-25 13:00:27 +09:00
2018-08-06 11:21:15 +02:00
2018-04-22 21:12:00 -04:00
2018-09-07 23:11:06 -07:00
2018-09-03 19:04:12 -07:00
2018-09-05 22:32:22 -07:00
2018-07-24 14:10:43 -07:00
2018-07-27 09:33:37 -07:00
2018-08-13 20:45:49 -07:00
2016-09-10 23:12:53 -07:00
2017-11-21 16:35:54 -08:00
2018-08-09 11:52:36 -07:00
2018-09-03 22:12:02 -07:00
2018-08-06 11:21:37 +02:00
2018-07-24 14:10:42 -07:00
2018-08-22 21:39:08 -07:00
2018-08-23 18:48:43 -07:00
2018-06-19 10:43:55 -04:00
2018-08-05 13:04:31 -07:00
2018-06-28 10:40:47 -07:00
2018-07-30 09:10:25 -07:00
2018-07-12 16:55:29 -07:00
2018-08-02 10:55:32 -07:00
2018-08-31 23:00:28 -07:00
2018-06-28 10:40:47 -07:00
2017-11-01 12:19:03 +09:00
2018-07-05 20:20:03 +09:00
2018-08-31 23:09:53 -07:00
2018-09-03 22:12:02 -07:00
2018-06-28 10:40:47 -07:00
2018-08-15 15:04:25 -07:00
2018-09-07 23:05:07 -07:00
2018-09-03 21:57:54 -07:00
2018-08-17 16:45:51 -06:00
2018-08-01 10:00:06 -07:00
2018-08-23 16:03:58 -07:00
2017-11-10 13:41:40 +09:00
2018-09-06 21:49:18 -07:00
2018-09-09 08:10:01 -07:00
2018-08-03 16:44:19 -07:00
2018-08-07 12:39:13 -07:00
2018-07-24 14:10:42 -07:00
2018-09-03 22:12:02 -07:00
2018-07-24 14:10:42 -07:00
2018-08-21 22:06:53 +02:00
2018-08-02 10:55:32 -07:00
2018-08-06 10:42:48 -07:00
2018-07-24 14:10:43 -07:00
2018-06-28 13:36:39 +09:00
2018-08-15 15:04:25 -07:00
2018-03-27 13:18:09 -04:00