Message ID | 20210806081110.692690159@linuxfoundation.org |
---|---|
State | New |
Headers | show |
Series | None | expand |
diff --git a/net/core/skbuff.c b/net/core/skbuff.c index 18dc8524e525..a278258e68cb 100644 --- a/net/core/skbuff.c +++ b/net/core/skbuff.c @@ -2702,8 +2702,11 @@ skb_zerocopy_headlen(const struct sk_buff *from) if (!from->head_frag || skb_headlen(from) < L1_CACHE_BYTES || - skb_shinfo(from)->nr_frags >= MAX_SKB_FRAGS) + skb_shinfo(from)->nr_frags >= MAX_SKB_FRAGS) { hlen = skb_headlen(from); + if (!hlen) + hlen = from->len; + } if (skb_has_frag_list(from)) hlen = from->len;