From 5a0be972042c0c996bcab88cef0b60c1bde1efcd Mon Sep 17 00:00:00 2001 From: Peter Hurley Date: Wed, 6 Mar 2013 07:20:57 -0500 Subject: [PATCH] --- yaml --- r: 364215 b: refs/heads/master c: 25fdf2435139542759df2eeb59e4998923c13403 h: refs/heads/master i: 364213: 219e0a7080975053a2ed6debcd9486234cfd6491 364211: 74fb43c74e5f305d0afa870372e208a7dda34138 364207: 909aadfc68d4da6511aa98720ff5b0a329534c1c v: v3 --- [refs] | 2 +- trunk/drivers/tty/tty_io.c | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/[refs] b/[refs] index 927c372a69fd..b3374c8761cf 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: f91e2590410bd992e3f065d17c55329bdaa51b1d +refs/heads/master: 25fdf2435139542759df2eeb59e4998923c13403 diff --git a/trunk/drivers/tty/tty_io.c b/trunk/drivers/tty/tty_io.c index 3feca406dc36..d3ddb31e363e 100644 --- a/trunk/drivers/tty/tty_io.c +++ b/trunk/drivers/tty/tty_io.c @@ -651,17 +651,17 @@ static void __tty_hangup(struct tty_struct *tty, int exit_session) } spin_unlock(&tty_files_lock); + refs = tty_signal_session_leader(tty, exit_session); + /* Account for the p->signal references we killed */ + while (refs--) + tty_kref_put(tty); + /* * it drops BTM and thus races with reopen * we protect the race by TTY_HUPPING */ tty_ldisc_hangup(tty); - refs = tty_signal_session_leader(tty, exit_session); - /* Account for the p->signal references we killed */ - while (refs--) - tty_kref_put(tty); - spin_lock_irq(&tty->ctrl_lock); clear_bit(TTY_THROTTLED, &tty->flags); clear_bit(TTY_PUSH, &tty->flags);