Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 107019
b: refs/heads/master
c: 641de9d
h: refs/heads/master
i:
  107017: 4f04d23
  107015: 61fec91
v: v3
  • Loading branch information
Uwe Kleine-König authored and Linus Torvalds committed Jul 30, 2008
1 parent bb655ba commit 18c8ca8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 8f3d137e0d6cd470a4e404cbc67480a0febdb0b1
refs/heads/master: 641de9d8f505db055d451b50e6e38117f84e79bb
8 changes: 4 additions & 4 deletions trunk/kernel/printk.c
Original file line number Diff line number Diff line change
Expand Up @@ -1309,14 +1309,14 @@ void tty_write_message(struct tty_struct *tty, char *msg)

#if defined CONFIG_PRINTK

DEFINE_RATELIMIT_STATE(printk_ratelimit_state, 5 * HZ, 10);
/*
* printk rate limiting, lifted from the networking subsystem.
*
* This enforces a rate limit: not more than one kernel message
* every printk_ratelimit_jiffies to make a denial-of-service
* attack impossible.
* This enforces a rate limit: not more than 10 kernel messages
* every 5s to make a denial-of-service attack impossible.
*/
DEFINE_RATELIMIT_STATE(printk_ratelimit_state, 5 * HZ, 10);

int printk_ratelimit(void)
{
return __ratelimit(&printk_ratelimit_state);
Expand Down

0 comments on commit 18c8ca8

Please sign in to comment.