Message ID | 20210806081109.462710839@linuxfoundation.org |
---|---|
State | Superseded |
Headers | show |
Series | None | expand |
diff --git a/net/core/skbuff.c b/net/core/skbuff.c index 076444dac96d..0e34f5ad6216 100644 --- a/net/core/skbuff.c +++ b/net/core/skbuff.c @@ -2288,8 +2288,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;