|
|
@@ -1709,6 +1709,7 @@ 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;
|
|
|
|
|
|
if (tty_paranoia_check(tty, inode, __func__))
|
|
|
return 0;
|
|
|
@@ -1793,7 +1794,11 @@ int tty_release(struct inode *inode, struct file *filp)
|
|
|
__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;
|
|
|
}
|
|
|
|
|
|
/*
|