From: Tom Herbert Date: Thu, 20 Aug 2015 00:07:34 +0000 (-0700) Subject: fou: Do WARN_ON_ONCE in gue_gro_receive for bad proto callbacks X-Git-Tag: v4.3-rc1~96^2~112^2 X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=commitdiff_plain;h=270136613bf7306e2b83457628e2b2f6c6be3989;p=linux.git fou: Do WARN_ON_ONCE in gue_gro_receive for bad proto callbacks Do WARN_ON_ONCE instead of WARN_ON in gue_gro_receive when the offload callcaks are bad (either don't exist or gro_receive is not specified). Signed-off-by: Tom Herbert Signed-off-by: David S. Miller --- diff --git a/net/ipv4/fou.c b/net/ipv4/fou.c index eb11f9506894..2d1646cff057 100644 --- a/net/ipv4/fou.c +++ b/net/ipv4/fou.c @@ -347,7 +347,7 @@ static struct sk_buff **gue_gro_receive(struct sk_buff **head, rcu_read_lock(); offloads = NAPI_GRO_CB(skb)->is_ipv6 ? inet6_offloads : inet_offloads; ops = rcu_dereference(offloads[guehdr->proto_ctype]); - if (WARN_ON(!ops || !ops->callbacks.gro_receive)) + if (WARN_ON_ONCE(!ops || !ops->callbacks.gro_receive)) goto out_unlock; pp = ops->callbacks.gro_receive(head, skb);