[Devel] [PATCH rh7] tty: Fix task hang if one of peers is sitting in read
Cyrill Gorcunov
gorcunov at virtuozzo.com
Wed Aug 24 04:54:32 PDT 2016
We reverted the former fix (ae93b8e96941c9ad) in commit 9539e4b2c5eee61f
but the changes ported by rh team eventually are still not enough.
So bring ae93b8e96941c9ad back.
https://jira.sw.ru/browse/PSBM-51273
Signed-off-by: Cyrill Gorcunov <gorcunov at virtuozzo.com>
CC: Igor Sukhih <igor at virtuozzo.com>
CC: Vladimir Davydov <vdavydov at virtuozzo.com>
CC: Konstantin Khorenko <khorenko at virtuozzo.com>
---
drivers/tty/tty_ldisc.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
Index: linux-pcs7.git/drivers/tty/tty_ldisc.c
===================================================================
--- linux-pcs7.git.orig/drivers/tty/tty_ldisc.c
+++ linux-pcs7.git/drivers/tty/tty_ldisc.c
@@ -685,7 +685,7 @@ void tty_ldisc_hangup(struct tty_struct
*
* Avoid racing set_ldisc or tty_ldisc_release
*/
- tty_ldisc_lock_pair(tty, tty->link);
+ tty_ldisc_lock(tty, MAX_SCHEDULE_TIMEOUT);
if (tty->ldisc) {
@@ -707,7 +707,7 @@ void tty_ldisc_hangup(struct tty_struct
WARN_ON(tty_ldisc_open(tty, tty->ldisc));
}
}
- tty_ldisc_enable_pair(tty, tty->link);
+ tty_ldisc_unlock(tty);
if (reset)
tty_reset_termios(tty);
More information about the Devel
mailing list