Commit 2004c055 authored by Peter Hurley's avatar Peter Hurley Committed by Luis Henriques

tty: Prevent "read/write wait queue active!" log flooding

commit 494c1eac upstream.

Only print one warning when a task is on the read_wait or write_wait
wait queue at final tty release.
Signed-off-by: default avatarPeter Hurley <peter@hurleysoftware.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarLuis Henriques <luis.henriques@canonical.com>
parent 82a1601e
......@@ -1702,6 +1702,7 @@ int tty_release(struct inode *inode, struct file *filp)
int idx;
char buf[64];
long timeout = 0;
int once = 1;
if (tty_paranoia_check(tty, inode, __func__))
return 0;
......@@ -1782,8 +1783,11 @@ int tty_release(struct inode *inode, struct file *filp)
if (!do_sleep)
break;
printk(KERN_WARNING "%s: %s: read/write wait queue active!\n",
__func__, tty_name(tty, buf));
if (once) {
once = 0;
printk(KERN_WARNING "%s: %s: read/write wait queue active!\n",
__func__, tty_name(tty, buf));
}
tty_unlock_pair(tty, o_tty);
mutex_unlock(&tty_mutex);
schedule_timeout_killable(timeout);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment