diff options
author | Peter Hurley <peter@hurleysoftware.com> | 2014-10-16 13:54:36 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-11-05 16:14:09 -0800 |
commit | 494c1eac7e73f719af9d474a96ec8494c33efd6a (patch) | |
tree | a89baeb96c6d5ccdd295ac246d0f21f7869d0c75 /drivers/tty | |
parent | 37b164578826406a173ca7c20d9ba7430134d23e (diff) | |
download | linux-494c1eac7e73f719af9d474a96ec8494c33efd6a.tar.bz2 |
tty: Prevent "read/write wait queue active!" log flooding
Only print one warning when a task is on the read_wait or write_wait
wait queue at final tty release.
Cc: <stable@vger.kernel.org> # 3.4.x+
Signed-off-by: Peter Hurley <peter@hurleysoftware.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty')
-rw-r--r-- | drivers/tty/tty_io.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/tty/tty_io.c b/drivers/tty/tty_io.c index 4021c10d9908..0508a1d8e4cd 100644 --- a/drivers/tty/tty_io.c +++ b/drivers/tty/tty_io.c @@ -1710,6 +1710,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; @@ -1790,8 +1791,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); |