Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 254137
b: refs/heads/master
c: 92f6fa0
h: refs/heads/master
i:
  254135: f92e3d8
v: v3
  • Loading branch information
Jiri Slaby authored and Greg Kroah-Hartman committed Jun 7, 2011
1 parent aa8064c commit 279fd96
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: cb01ece3ea5dec16ac7bab30069c7736b59f7dea
refs/heads/master: 92f6fa09bd453ffe3351fa1f1377a1b7cfa911e6
4 changes: 3 additions & 1 deletion trunk/drivers/tty/tty_ldisc.c
Original file line number Diff line number Diff line change
Expand Up @@ -555,7 +555,7 @@ static void tty_ldisc_flush_works(struct tty_struct *tty)
static int tty_ldisc_wait_idle(struct tty_struct *tty)
{
int ret;
ret = wait_event_interruptible_timeout(tty_ldisc_idle,
ret = wait_event_timeout(tty_ldisc_idle,
atomic_read(&tty->ldisc->users) == 1, 5 * HZ);
if (ret < 0)
return ret;
Expand Down Expand Up @@ -763,6 +763,8 @@ static int tty_ldisc_reinit(struct tty_struct *tty, int ldisc)
if (IS_ERR(ld))
return -1;

WARN_ON_ONCE(tty_ldisc_wait_idle(tty));

tty_ldisc_close(tty, tty->ldisc);
tty_ldisc_put(tty->ldisc);
tty->ldisc = NULL;
Expand Down

0 comments on commit 279fd96

Please sign in to comment.