From: Jakub Kicinski Date: Mon, 11 Apr 2022 19:19:12 +0000 (-0700) Subject: tls: rx: assume crypto always calls our callback X-Git-Url: http://git.hungrycats.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bdb7fb29236a52c21c6f2b76354c1699ce19050d;p=linux tls: rx: assume crypto always calls our callback [ 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 Signed-off-by: David S. Miller Stable-dep-of: f7fa16d49837 ("tls: decrement decrypt_pending if no async completion will be called") Signed-off-by: Sasha Levin --- diff --git a/net/tls/tls_sw.c b/net/tls/tls_sw.c index 85fa49170b4e..27ac27daec86 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; }