]> Git Repo - linux.git/commit
net/tls: free the record on encryption error
authorJakub Kicinski <[email protected]>
Wed, 27 Nov 2019 20:16:40 +0000 (12:16 -0800)
committerDavid S. Miller <[email protected]>
Fri, 29 Nov 2019 06:40:29 +0000 (22:40 -0800)
commitd10523d0b3d78153ee58d19853ced26c9004c8c4
tree8e86eea39a1cfc9a35cc3abb86e532915f0e10c7
parentc329ef9684de9517d82af5b4758c9e1b64a8a11a
net/tls: free the record on encryption error

When tls_do_encryption() fails the SG lists are left with the
SG_END and SG_CHAIN marks in place. One could hope that once
encryption fails we will never see the record again, but that
is in fact not true. Commit d3b18ad31f93 ("tls: add bpf support
to sk_msg handling") added special handling to ENOMEM and ENOSPC
errors which mean we may see the same record re-submitted.

As suggested by John free the record, the BPF code is already
doing just that.

Reported-by: [email protected]
Fixes: d3b18ad31f93 ("tls: add bpf support to sk_msg handling")
Signed-off-by: Jakub Kicinski <[email protected]>
Reviewed-by: Simon Horman <[email protected]>
Acked-by: John Fastabend <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
net/tls/tls_sw.c
This page took 0.054345 seconds and 4 git commands to generate.