5.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Jakub Kicinski kuba@kernel.org
[ Upstream commit 1c699ffa48a15710746989c36a82cbfb07e8d17f ]
If crypto didn't always invoke our callback for async we'd not be clearing skb->sk and would crash in the skb core when freeing it. This if must be dead code.
Signed-off-by: Jakub Kicinski kuba@kernel.org Signed-off-by: David S. Miller davem@davemloft.net Stable-dep-of: f7fa16d49837 ("tls: decrement decrypt_pending if no async completion will be called") Signed-off-by: Sasha Levin sashal@kernel.org --- net/tls/tls_sw.c | 3 --- 1 file changed, 3 deletions(-)
diff --git a/net/tls/tls_sw.c b/net/tls/tls_sw.c index 85fa49170b4e5..27ac27daec868 100644 --- a/net/tls/tls_sw.c +++ b/net/tls/tls_sw.c @@ -277,9 +277,6 @@ static int tls_do_decryption(struct sock *sk, if (ret == -EBADMSG) TLS_INC_STATS(sock_net(sk), LINUX_MIB_TLSDECRYPTERROR);
- if (async) - atomic_dec(&ctx->decrypt_pending); - return ret; }