ch_ktls: fix device connection close
authorVinay Kumar Yadav <vinay.yadav@chelsio.com>
Thu, 15 Apr 2021 07:47:46 +0000 (13:17 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 21 Apr 2021 11:00:58 +0000 (13:00 +0200)
commit5f3c278035c0922b5747117028346fcd83410c24
tree12b02fffd268a861973ae8fe9f89a7354a4d0d5e
parent8d5a9dbd2116a852f8f0f91f6fbc42a0afe1091f
ch_ktls: fix device connection close

commit bc16efd2430652f894ae34b1de5eccc3bf0d2810 upstream.

When sge queue is full and chcr_ktls_xmit_wr_complete()
returns failure, skb is not freed if it is not the last tls record in
this skb, causes refcount never gets freed and tls_dev_del()
never gets called on this connection.

Fixes: 5a4b9fe7fece ("cxgb4/chcr: complete record tx handling")
Signed-off-by: Vinay Kumar Yadav <vinay.yadav@chelsio.com>
Signed-off-by: Rohit Maheshwari <rohitm@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/ethernet/chelsio/inline_crypto/ch_ktls/chcr_ktls.c