Skip to contentSkip to conversation

net: rate-limit warn-bad-offload splats.

PATCH Applied [email protected] 2 participants 2 messages Apr 19, 2013

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 net: rate-limit warn-bad-offload splats.

From: Ben Greear <[email protected]>

If one does do something unfortunate and allow a bad offload bug into the kernel, this the skb_warn_bad_offload can effectively live-lock the system, filling the logs with the same error over and over.

Add rate limitation to this so that box remains otherwise functional in this case.

---
 net/core/dev.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
net/core/dev.c +3 -0
index 2ae4e93..ff27b34 100644
@@ -2165,6 +2165,9 @@ static void skb_warn_bad_offload(const struct sk_buff *skb)
 	struct net_device *dev = skb->dev;
 	const char *driver = "";
 
+	if (!net_ratelimit())
+		return;
+
 	if (dev && dev->dev.parent)
 		driver = dev_driver_string(dev->dev.parent);
 
Signature · 1 line
1.7.3.4
maintainer Applied
#1 lore raw

From: [email protected]
Date: Fri, 19 Apr 2013 13:45:52 -0700

Quoted 8 lines

From: Ben Greear <[email protected]>

If one does do something unfortunate and allow a bad offload bug into the kernel, this the skb_warn_bad_offload can effectively live-lock the system, filling the logs with the same error over and over.

Quoted 4 lines

Add rate limitation to this so that box remains otherwise functional in this case.

Applied, thanks Ben.