From: Uwe Kleine-König Date: Wed, 30 Jul 2008 05:33:38 +0000 (-0700) Subject: printk: fix comment for printk ratelimiting X-Git-Tag: v2.6.27-rc2~177 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=641de9d8f505db055d451b50e6e38117f84e79bb;p=linux-2.6 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 Cc: Dave Young Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/kernel/printk.c b/kernel/printk.c index a7f7559c5f..b51b1567bb 100644 --- a/kernel/printk.c +++ b/kernel/printk.c @@ -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);