Skip to content

Commit

Permalink
tls: rx: don't issue wake ups when data is decrypted
Browse files Browse the repository at this point in the history
We inform the applications that data is available when
the record is received. Decryption happens inline inside
recvmsg or splice call. Generating another wakeup inside
the decryption handler seems pointless as someone must
be actively reading the socket if we are executing this
code.

Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Jakub Kicinski authored and David S. Miller committed Apr 8, 2022
1 parent 5deee41 commit 5dbda02
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions net/tls/tls_sw.c
Original file line number Diff line number Diff line change
Expand Up @@ -1561,7 +1561,6 @@ static int decrypt_skb_update(struct sock *sk, struct sk_buff *skb,
bool async)
{
struct tls_context *tls_ctx = tls_get_ctx(sk);
struct tls_sw_context_rx *ctx = tls_sw_ctx_rx(tls_ctx);
struct tls_prot_info *prot = &tls_ctx->prot_info;
struct strp_msg *rxm = strp_msg(skb);
struct tls_msg *tlm = tls_msg(skb);
Expand Down Expand Up @@ -1600,7 +1599,6 @@ static int decrypt_skb_update(struct sock *sk, struct sk_buff *skb,
rxm->full_len -= prot->overhead_size;
tls_advance_record_sn(sk, prot, &tls_ctx->rx);
tlm->decrypted = 1;
ctx->saved_data_ready(sk);
} else {
*zc = false;
}
Expand Down

0 comments on commit 5dbda02

Please sign in to comment.