提交 4050914f 编写于 作者: A Akinobu Mita 提交者: Linus Torvalds

[PATCH] rate limiting for the ldisc open failure messages

This patch limits the messages when ldisc open faulures happen.  It happens
under memory pressure.
Signed-off-by: NAkinobu Mita <mita@miraclelinux.com>
Acked-by: NAlan Cox <alan@redhat.com>
Signed-off-by: NAndrew Morton <akpm@osdl.org>
Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
上级 1a036cdd
......@@ -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;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册