Message ID | 20210715235900.1715962-1-pravin.ovn@gmail.com (mailing list archive) |
---|---|
State | Accepted |
Commit | a17ad0961706244dce48ec941f7e476a38c0e727 |
Delegated to: | Netdev Maintainers |
Headers | show |
Series | net: Fix zero-copy head len calculation. | expand |
Context | Check | Description |
---|---|---|
netdev/cover_letter | success | Link |
netdev/fixes_present | success | Link |
netdev/patch_count | success | Link |
netdev/tree_selection | success | Guessed tree name to be net-next |
netdev/subject_prefix | warning | Target tree name not specified in the subject |
netdev/cc_maintainers | fail | 8 maintainers not CCed: linmiaohe@huawei.com jonathan.lemon@gmail.com gnault@redhat.com cong.wang@bytedance.com willemb@google.com alobakin@pm.me davem@davemloft.net kuba@kernel.org |
netdev/source_inline | success | Was 0 now: 0 |
netdev/verify_signedoff | success | Link |
netdev/module_param | success | Was 0 now: 0 |
netdev/build_32bit | success | Errors and warnings before: 1 this patch: 1 |
netdev/kdoc | success | Errors and warnings before: 0 this patch: 0 |
netdev/verify_fixes | success | Link |
netdev/checkpatch | success | total: 0 errors, 0 warnings, 0 checks, 12 lines checked |
netdev/build_allmodconfig_warn | success | Errors and warnings before: 1 this patch: 1 |
netdev/header_inline | success | Link |
Hello: This patch was applied to netdev/net.git (refs/heads/master): On Thu, 15 Jul 2021 16:59:00 -0700 you wrote: > From: Pravin B Shelar <pshelar@ovn.org> > > In some cases skb head could be locked and entire header > data is pulled from skb. When skb_zerocopy() called in such cases, > following BUG is triggered. This patch fixes it by copying entire > skb in such cases. > This could be optimized incase this is performance bottleneck. > > [...] Here is the summary with links: - net: Fix zero-copy head len calculation. https://git.kernel.org/netdev/net/c/a17ad0961706 You are awesome, thank you! -- Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html
diff --git a/net/core/skbuff.c b/net/core/skbuff.c index f63de967ac25..eaa264984535 100644 --- a/net/core/skbuff.c +++ b/net/core/skbuff.c @@ -3011,8 +3011,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;