mirror of
https://github.com/hardkernel/linux.git
synced 2026-03-25 03:50:24 +09:00
net: tls: fix async vs NIC crypto offload
commitc706b2b5edupstream. 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 <gal@nvidia.com> Fixes:3547a1f9d9("tls: rx: use async as an in-out argument") Tested-by: Gal Pressman <gal@nvidia.com> Link: https://lore.kernel.org/r/20220425233309.344858-1-kuba@kernel.org Signed-off-by: Jakub Kicinski <kuba@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
68dbe92d67
commit
9d5932275b
@@ -1568,6 +1568,7 @@ static int decrypt_skb_update(struct sock *sk, struct sk_buff *skb,
|
||||
|
||||
if (tlm->decrypted) {
|
||||
darg->zc = false;
|
||||
darg->async = false;
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -1578,6 +1579,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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user