diff options
author | Grant Likely <grant.likely@linaro.org> | 2014-11-24 14:50:07 +0000 |
---|---|---|
committer | Grant Likely <grant.likely@linaro.org> | 2014-11-24 14:50:07 +0000 |
commit | 66e6a5a1fcd2f3e05f4d499b539a1f77ceb52d1d (patch) | |
tree | d72f980f64b88ea4e976215a503fcb038e02f981 /drivers/tty/tty_io.c | |
parent | 2d0747c4b68be8eb8ccfa2c538f2f5dd2ea89094 (diff) | |
parent | 5d01410fe4d92081f349b013a2e7a95429e4f2c9 (diff) | |
download | linux-next-66e6a5a1fcd2f3e05f4d499b539a1f77ceb52d1d.tar.gz |
Merge tag 'v3.18-rc6' into devicetree/next
v3.18-rc6 contains an important DT bug fix, c1a2086e2d, "of/selftest:
Fix off-by-one error in removal path" which affects testing of the
overlay patch series. Merge it into the devicetree/next staging branch
so that the overlay patches are applied on top of a known working tree.
Linux 3.18-rc6
Conflicts:
drivers/of/address.c
Diffstat (limited to 'drivers/tty/tty_io.c')
-rw-r--r-- | drivers/tty/tty_io.c | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/drivers/tty/tty_io.c b/drivers/tty/tty_io.c index 16a2c0237dd6..0508a1d8e4cd 100644 --- a/drivers/tty/tty_io.c +++ b/drivers/tty/tty_io.c @@ -1709,6 +1709,8 @@ int tty_release(struct inode *inode, struct file *filp) int pty_master, tty_closing, o_tty_closing, do_sleep; int idx; char buf[64]; + long timeout = 0; + int once = 1; if (tty_paranoia_check(tty, inode, __func__)) return 0; @@ -1789,11 +1791,18 @@ 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(); + schedule_timeout_killable(timeout); + if (timeout < 120 * HZ) + timeout = 2 * timeout + 1; + else + timeout = MAX_SCHEDULE_TIMEOUT; } /* |