From: Eric Dumazet Date: Fri, 3 Feb 2017 22:29:42 +0000 (-0800) Subject: net: skb_needs_check() accepts CHECKSUM_NONE for tx X-Git-Tag: v4.9.41~62 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=48a70be0de9e014994c4bd4749c9ccc15bc7731a;p=platform%2Fkernel%2Flinux-amlogic.git net: skb_needs_check() accepts CHECKSUM_NONE for tx commit 6e7bc478c9a006c701c14476ec9d389a484b4864 upstream. My recent change missed fact that UFO would perform a complete UDP checksum before segmenting in frags. In this case skb->ip_summed is set to CHECKSUM_NONE. We need to add this valid case to skb_needs_check() Fixes: b2504a5dbef3 ("net: reduce skb_warn_bad_offload() noise") Signed-off-by: Eric Dumazet Cc: Willem de Bruijn Signed-off-by: David S. Miller Signed-off-by: Greg Kroah-Hartman --- diff --git a/net/core/dev.c b/net/core/dev.c index 69d604e..0af019d 100644 --- a/net/core/dev.c +++ b/net/core/dev.c @@ -2702,9 +2702,10 @@ EXPORT_SYMBOL(skb_mac_gso_segment); static inline bool skb_needs_check(struct sk_buff *skb, bool tx_path) { if (tx_path) - return skb->ip_summed != CHECKSUM_PARTIAL; - else - return skb->ip_summed == CHECKSUM_NONE; + return skb->ip_summed != CHECKSUM_PARTIAL && + skb->ip_summed != CHECKSUM_NONE; + + return skb->ip_summed == CHECKSUM_NONE; } /**