diff --git a/[refs] b/[refs] index 9d8be8916cfe..c56d0c044019 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: f18f9498e90327b9b0e245e191029e6e1996d203 +refs/heads/master: 38c70b27f9502c31c1d0c29676275f7362cdb0d9 diff --git a/trunk/drivers/char/tty_io.c b/trunk/drivers/char/tty_io.c index c408c81c06a0..cc941a3504d7 100644 --- a/trunk/drivers/char/tty_io.c +++ b/trunk/drivers/char/tty_io.c @@ -505,8 +505,6 @@ static void do_tty_hangup(struct work_struct *work) if (!tty) return; - /* inuse_filps is protected by the single kernel lock */ - lock_kernel(); spin_lock(&redirect_lock); if (redirect && redirect->private_data == tty) { @@ -515,6 +513,8 @@ static void do_tty_hangup(struct work_struct *work) } spin_unlock(&redirect_lock); + /* inuse_filps is protected by the single kernel lock */ + lock_kernel(); check_tty_count(tty, "do_tty_hangup"); file_list_lock(); /* This breaks for file handles being sent over AF_UNIX sockets ? */