linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] make net_gso_ok return false when gso_type is zero(invalid)
@ 2018-04-06  1:43 Wenhua Shi
  2018-04-08 16:51 ` David Miller
  0 siblings, 1 reply; 6+ messages in thread
From: Wenhua Shi @ 2018-04-06  1:43 UTC (permalink / raw)
  Cc: David S. Miller, netdev, linux-kernel

Signed-off-by: Wenhua Shi <march511@gmail.com>
---
 include/linux/netdevice.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index cf44503e..1f26cbcf 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -4187,7 +4187,7 @@ static inline bool net_gso_ok(netdev_features_t features, int gso_type)
 	BUILD_BUG_ON(SKB_GSO_ESP != (NETIF_F_GSO_ESP >> NETIF_F_GSO_SHIFT));
 	BUILD_BUG_ON(SKB_GSO_UDP != (NETIF_F_GSO_UDP >> NETIF_F_GSO_SHIFT));
 
-	return (features & feature) == feature;
+	return feature && (features & feature) == feature;
 }
 
 static inline bool skb_gso_ok(struct sk_buff *skb, netdev_features_t features)
-- 
2.11.0

^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2018-04-11 14:00 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-04-06  1:43 [PATCH] make net_gso_ok return false when gso_type is zero(invalid) Wenhua Shi
2018-04-08 16:51 ` David Miller
2018-04-08 18:41   ` Wenhua Shi
2018-04-10 16:32     ` Marcelo Ricardo Leitner
2018-04-11  0:51       ` Wenhua Shi
2018-04-11 13:59         ` Wenhua Shi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).