Skip to content

Commit

Permalink
[PATCH] rate limiting for the ldisc open failure messages
Browse files Browse the repository at this point in the history
This patch limits the messages when ldisc open faulures happen.  It happens
under memory pressure.

Signed-off-by: Akinobu Mita <[email protected]>
Acked-by: Alan Cox <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
Akinobu Mita authored and Linus Torvalds committed Sep 29, 2006
1 parent 1a036cd commit 4050914
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions drivers/char/tty_io.c
Original file line number Diff line number Diff line change
Expand Up @@ -2065,8 +2065,9 @@ static int init_dev(struct tty_driver *driver, int idx,

/* 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;
}
Expand Down

0 comments on commit 4050914

Please sign in to comment.