netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next] net: remove useless check in napi_gro_frags()
@ 2015-11-19 19:42 Eric Dumazet
  2015-11-19 19:54 ` Alexei Starovoitov
  0 siblings, 1 reply; 8+ messages in thread
From: Eric Dumazet @ 2015-11-19 19:42 UTC (permalink / raw)
  To: David Miller; +Cc: netdev

From: Eric Dumazet <edumazet@google.com>

Checking if skb is NULL in napi_gro_frags() is too late.

If skb was NULL, we would crash earlier in napi_frags_skb()

Drivers normally catch napi_get_frags() NULL return value
before calling napi_gro_frags()

Signed-off-by: Eric Dumazet <edumazet@google.com>
---
 net/core/dev.c |    3 ---
 1 file changed, 3 deletions(-)

diff --git a/net/core/dev.c b/net/core/dev.c
index 41cef3e3f558b857a9093a83f6b0c73f32b8b45f..8d8d34ff68f5800dbcb2958b6a937b9db478e359 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -4465,9 +4465,6 @@ gro_result_t napi_gro_frags(struct napi_struct *napi)
 {
 	struct sk_buff *skb = napi_frags_skb(napi);
 
-	if (!skb)
-		return GRO_DROP;
-
 	trace_napi_gro_frags_entry(skb);
 
 	return napi_frags_finish(napi, skb, dev_gro_receive(napi, skb));

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

end of thread, other threads:[~2015-11-20 19:59 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-11-19 19:42 [PATCH net-next] net: remove useless check in napi_gro_frags() Eric Dumazet
2015-11-19 19:54 ` Alexei Starovoitov
2015-11-19 20:15   ` Eric Dumazet
2015-11-19 20:20     ` Bjørn Mork
2015-11-19 20:33       ` Eric Dumazet
2015-11-19 21:06         ` Aaron Conole
2015-11-19 21:43           ` Eric Dumazet
2015-11-20 19:59             ` David Miller

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).