|
@@ -1763,6 +1763,8 @@ int tty_release(struct inode *inode, struct file *filp)
|
|
|
int do_sleep, final;
|
|
|
int idx;
|
|
|
char buf[64];
|
|
|
+ long timeout = 0;
|
|
|
+ int once = 1;
|
|
|
|
|
|
if (tty_paranoia_check(tty, inode, __func__))
|
|
|
return 0;
|
|
@@ -1832,9 +1834,16 @@ 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));
|
|
|
- schedule();
|
|
|
+ if (once) {
|
|
|
+ once = 0;
|
|
|
+ printk(KERN_WARNING "%s: %s: read/write wait queue active!\n",
|
|
|
+ __func__, tty_name(tty, buf));
|
|
|
+ }
|
|
|
+ schedule_timeout_killable(timeout);
|
|
|
+ if (timeout < 120 * HZ)
|
|
|
+ timeout = 2 * timeout + 1;
|
|
|
+ else
|
|
|
+ timeout = MAX_SCHEDULE_TIMEOUT;
|
|
|
}
|
|
|
|
|
|
if (o_tty) {
|