Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit c846ad9

Browse files
greearbdavem330
authored andcommitted
net: rate-limit warn-bad-offload splats.
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 <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent b261c20 commit c846ad9

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

net/core/dev.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2148,6 +2148,9 @@ static void skb_warn_bad_offload(const struct sk_buff *skb)
21482148
struct net_device *dev = skb->dev;
21492149
const char *driver = "";
21502150

2151+
if (!net_ratelimit())
2152+
return;
2153+
21512154
if (dev && dev->dev.parent)
21522155
driver = dev_driver_string(dev->dev.parent);
21532156

0 commit comments

Comments
 (0)