netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Tom Herbert <tom@herbertland.com>
To: <davem@davemloft.net>, <netdev@vger.kernel.org>
Cc: <kernel-team@fb.com>
Subject: [PATCH v2 net-next 4/4] fou: Do WARN_ON_ONCE in gue_gro_receive for bad proto callbacks
Date: Mon, 3 Aug 2015 10:11:18 -0700	[thread overview]
Message-ID: <1438621878-1113072-5-git-send-email-tom@herbertland.com> (raw)
In-Reply-To: <1438621878-1113072-1-git-send-email-tom@herbertland.com>

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>
---
 net/ipv4/fou.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/ipv4/fou.c b/net/ipv4/fou.c
index eb11f95..2d1646c 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);
-- 
1.8.5.6

  parent reply	other threads:[~2015-08-03 17:13 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-03 17:11 [PATCH v2 net-next 0/4] gro: Fixes for tunnels and GRO Tom Herbert
2015-08-03 17:11 ` [PATCH v2 net-next 1/4] gro: Fix remcsum offload to deal with frags in GRO Tom Herbert
2015-08-03 17:11 ` [PATCH v2 net-next 2/4] vxlan: GRO support at tunnel layer Tom Herbert
2015-08-03 17:11 ` [PATCH v2 net-next 3/4] ipv6: Add gro functions to sit_offloads Tom Herbert
2015-08-07  0:15   ` Jesse Gross
2015-10-16 15:23     ` Eric Dumazet
2015-10-20  2:04       ` Eric Dumazet
2015-10-20  3:40         ` [PATCH net-next] ipv6: gro: support sit protocol Eric Dumazet
2015-10-20  3:51           ` Tom Herbert
2015-10-22  2:37           ` David Miller
2015-11-03 12:57           ` Wolfgang Walter
2015-11-03 13:07             ` Eric Dumazet
2015-11-03 21:14               ` Tom Herbert
2015-11-04 12:19               ` Wolfgang Walter
2015-11-04 12:40                 ` Eric Dumazet
2015-11-04 14:09                   ` Wolfgang Walter
2015-11-04 15:13                     ` Eric Dumazet
2015-11-04 17:05                       ` Wolfgang Walter
2015-10-20  9:21       ` [PATCH v2 net-next 3/4] ipv6: Add gro functions to sit_offloads Wolfgang Walter
2015-08-03 17:11 ` Tom Herbert [this message]
2015-08-07  1:55 ` [PATCH v2 net-next 0/4] gro: Fixes for tunnels and GRO David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1438621878-1113072-5-git-send-email-tom@herbertland.com \
    --to=tom@herbertland.com \
    --cc=davem@davemloft.net \
    --cc=kernel-team@fb.com \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).