Re: [PATCH net-next v1] net/tls: Set count of SG entries if sk_alloc_sg returns -ENOSPC

2018-09-06 Thread Sabrina Dubroca
2018-09-05, 21:57:43 +0530, Vakul Garg wrote: > 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

[PATCH net-next v1] net/tls: Set count of SG entries if sk_alloc_sg returns -ENOSPC

2018-09-05 Thread Vakul Garg
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