]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
net: rate-limit warn-bad-offload splats.
authorBen Greear <greearb@candelatech.com>
Fri, 19 Apr 2013 10:45:52 +0000 (10:45 +0000)
committerDavid S. Miller <davem@davemloft.net>
Fri, 19 Apr 2013 21:57:49 +0000 (17:57 -0400)
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.

Signed-off-by: Ben Greear <greearb@candelatech.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/core/dev.c

index e7d68ed8aafe60f75233fcdc1ed68c39e755cda6..b24ab0e98eb4d8dd8cef2a20ef2a39b97d9ece92 100644 (file)
@@ -2148,6 +2148,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);