]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
fou: Do WARN_ON_ONCE in gue_gro_receive for bad proto callbacks
authorTom Herbert <tom@herbertland.com>
Thu, 20 Aug 2015 00:07:34 +0000 (17:07 -0700)
committerChuck Anderson <chuck.anderson@oracle.com>
Fri, 15 Sep 2017 03:39:09 +0000 (20:39 -0700)
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 <tom@herbertland.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Orabug: 25879842
(cherry picked from commit 270136613bf7306e2b83457628e2b2f6c6be3989)
Signed-off-by: Cathy Zhou <Cathy.Zhou@Oracle.COM>
Reviewed-by: Jack Vogel <jack.vogel@oracle.com>
net/ipv4/fou.c

index 909ca7001fa9a575b0a2db541a87437e1efabec2..6a4245b2aac299393645210060b11e87962c2064 100644 (file)
@@ -348,7 +348,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 = call_gro_receive(ops->callbacks.gro_receive, head, skb);