Commit 6c4a5cb219520c7bc937ee186ca53f03733bd09f

Authored by Joe Perches
Committed by David S. Miller
1 parent b3eec79b07

net: filter: Use WARN_RATELIMIT

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>

Showing 1 changed file with 3 additions and 1 deletions Side-by-side Diff

... ... @@ -350,7 +350,9 @@
350 350 continue;
351 351 }
352 352 default:
353   - WARN_ON(1);
  353 + WARN_RATELIMIT(1, "Unknown code:%u jt:%u tf:%u k:%u\n",
  354 + fentry->code, fentry->jt,
  355 + fentry->jf, fentry->k);
354 356 return 0;
355 357 }
356 358 }