* [PATCH] rate limiting for the ldisc open faulure messages
@ 2006-08-31 9:49 Akinobu Mita
2006-08-31 10:31 ` Alan Cox
0 siblings, 1 reply; 2+ messages in thread
From: Akinobu Mita @ 2006-08-31 9:49 UTC (permalink / raw)
To: akpm; +Cc: linux-kernel
This patch limits the messages when ldisc open faulures happen.
It happens under memory pressure.
Signed-off-by: Akinobu Mita <mita@miraclelinux.com>
drivers/char/tty_io.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
Index: work-shouldfail/drivers/char/tty_io.c
===================================================================
--- work-shouldfail.orig/drivers/char/tty_io.c
+++ work-shouldfail/drivers/char/tty_io.c
@@ -2072,8 +2072,9 @@ fail_no_mem:
/* call the tty release_mem routine to clean out this slot */
release_mem_out:
- printk(KERN_INFO "init_dev: ldisc open failed, "
- "clearing slot %d\n", idx);
+ if (printk_ratelimit())
+ printk(KERN_INFO "init_dev: ldisc open failed, "
+ "clearing slot %d\n", idx);
release_mem(tty, idx);
goto end_init;
}
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2006-08-31 10:10 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-08-31 9:49 [PATCH] rate limiting for the ldisc open faulure messages Akinobu Mita
2006-08-31 10:31 ` Alan Cox
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.