Skip to content

Commit

Permalink
net: tls: fix async vs NIC crypto offload
Browse files Browse the repository at this point in the history
When NIC takes care of crypto (or the record has already
been decrypted) we forget to update darg->async. ->async
is supposed to mean whether record is async capable on
input and whether record has been queued for async crypto
on output.

Reported-by: Gal Pressman <[email protected]>
Fixes: 3547a1f ("tls: rx: use async as an in-out argument")
Tested-by: Gal Pressman <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Jakub Kicinski <[email protected]>
  • Loading branch information
kuba-moo committed Apr 27, 2022
1 parent fae4630 commit c706b2b
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions net/tls/tls_sw.c
Original file line number Diff line number Diff line change
Expand Up @@ -1562,6 +1562,7 @@ static int decrypt_skb_update(struct sock *sk, struct sk_buff *skb,

if (tlm->decrypted) {
darg->zc = false;
darg->async = false;
return 0;
}

Expand All @@ -1572,6 +1573,7 @@ static int decrypt_skb_update(struct sock *sk, struct sk_buff *skb,
if (err > 0) {
tlm->decrypted = 1;
darg->zc = false;
darg->async = false;
goto decrypt_done;
}
}
Expand Down

0 comments on commit c706b2b

Please sign in to comment.