diff options
author | Uwe Kleine-König <Uwe.Kleine-Koenig@digi.com> | 2008-07-30 01:33:38 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-07-30 12:41:45 -0400 |
commit | 641de9d8f505db055d451b50e6e38117f84e79bb (patch) | |
tree | af9cbd5390321a7f5a6b245215c79289930f41bd /kernel | |
parent | 8f3d137e0d6cd470a4e404cbc67480a0febdb0b1 (diff) |
printk: fix comment for printk ratelimiting
The comment assumed the burst to be one and the ratelimit used to be named
printk_ratelimit_jiffies.
Signed-off-by: Uwe Kleine-König <Uwe.Kleine-Koenig@digi.com>
Cc: Dave Young <hidave.darkstar@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/printk.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/kernel/printk.c b/kernel/printk.c index a7f7559c5f6c..b51b1567bb55 100644 --- a/kernel/printk.c +++ b/kernel/printk.c | |||
@@ -1309,14 +1309,14 @@ void tty_write_message(struct tty_struct *tty, char *msg) | |||
1309 | 1309 | ||
1310 | #if defined CONFIG_PRINTK | 1310 | #if defined CONFIG_PRINTK |
1311 | 1311 | ||
1312 | DEFINE_RATELIMIT_STATE(printk_ratelimit_state, 5 * HZ, 10); | ||
1313 | /* | 1312 | /* |
1314 | * printk rate limiting, lifted from the networking subsystem. | 1313 | * printk rate limiting, lifted from the networking subsystem. |
1315 | * | 1314 | * |
1316 | * This enforces a rate limit: not more than one kernel message | 1315 | * This enforces a rate limit: not more than 10 kernel messages |
1317 | * every printk_ratelimit_jiffies to make a denial-of-service | 1316 | * every 5s to make a denial-of-service attack impossible. |
1318 | * attack impossible. | ||
1319 | */ | 1317 | */ |
1318 | DEFINE_RATELIMIT_STATE(printk_ratelimit_state, 5 * HZ, 10); | ||
1319 | |||
1320 | int printk_ratelimit(void) | 1320 | int printk_ratelimit(void) |
1321 | { | 1321 | { |
1322 | return __ratelimit(&printk_ratelimit_state); | 1322 | return __ratelimit(&printk_ratelimit_state); |