aboutsummaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2011-05-21 07:48:40 +0000
committerAndi Kleen <ak@linux.intel.com>2011-08-01 13:54:59 -0700
commit7666ff7ed41d95540caa91717aad005578230a85 (patch)
tree6ec50a18ddeb0f7e1a2d2c38cc607a6edc8a9923 /net
parentca62683d3b5f66f89e8b85ff2329cb1794d6c04c (diff)
net: filter: Use WARN_RATELIMIT
[ Upstream commit 6c4a5cb219520c7bc937ee186ca53f03733bd09f ] A mis-configured filter can spam the logs with lots of stack traces. Rate-limit the warnings and add printout of the bogus filter information. Original-patch-by: Ben Greear <greearb@candelatech.com> Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> Signed-off-by: Andi Kleen <ak@linux.intel.com>
Diffstat (limited to 'net')
-rw-r--r--net/core/filter.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/net/core/filter.c b/net/core/filter.c
index 71a433cdf7d..84df7376559 100644
--- a/net/core/filter.c
+++ b/net/core/filter.c
@@ -292,7 +292,9 @@ load_b:
mem[f_k] = X;
continue;
default:
- WARN_ON(1);
+ WARN_RATELIMIT(1, "Unknown code:%u jt:%u tf:%u k:%u\n",
+ fentry->code, fentry->jt,
+ fentry->jf, fentry->k);
return 0;
}