aboutsummaryrefslogtreecommitdiffstats
path: root/net/tls/tls_strp.c
diff options
context:
space:
mode:
authorJakub Kicinski <[email protected]>2023-05-17 01:50:37 +0000
committerDavid S. Miller <[email protected]>2023-05-19 07:37:37 +0000
commit210620ae44a83f25220450bbfcc22e6fe986b25f (patch)
treeb036664e7653b0aac340b40233a9d0116e11d1c1 /net/tls/tls_strp.c
parenttls: rx: device: fix checking decryption status (diff)
downloadkernel-210620ae44a83f25220450bbfcc22e6fe986b25f.tar.gz
kernel-210620ae44a83f25220450bbfcc22e6fe986b25f.zip
tls: rx: strp: set the skb->len of detached / CoW'ed skbs
alloc_skb_with_frags() fills in page frag sizes but does not set skb->len and skb->data_len. Set those correctly otherwise device offload will most likely generate an empty skb and hit the BUG() at the end of __skb_nsg(). Fixes: 84c61fe1a75b ("tls: rx: do not use the standard strparser") Tested-by: Shai Amiram <[email protected]> Signed-off-by: Jakub Kicinski <[email protected]> Reviewed-by: Simon Horman <[email protected]> Signed-off-by: David S. Miller <[email protected]>
Diffstat (limited to 'net/tls/tls_strp.c')
-rw-r--r--net/tls/tls_strp.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/net/tls/tls_strp.c b/net/tls/tls_strp.c
index 955ac3e0bf4d..24016c865e00 100644
--- a/net/tls/tls_strp.c
+++ b/net/tls/tls_strp.c
@@ -56,6 +56,8 @@ static struct sk_buff *tls_strp_msg_make_copy(struct tls_strparser *strp)
offset += skb_frag_size(frag);
}
+ skb->len = strp->stm.full_len;
+ skb->data_len = strp->stm.full_len;
skb_copy_header(skb, strp->anchor);
rxm = strp_msg(skb);
rxm->offset = 0;