From a7514e14426cb283334a4b09a4cda4fae4423b58 Mon Sep 17 00:00:00 2001 From: Alan Cox Date: Mon, 30 Nov 2009 13:18:40 +0000 Subject: [PATCH] --- yaml --- r: 175363 b: refs/heads/master c: 38c70b27f9502c31c1d0c29676275f7362cdb0d9 h: refs/heads/master i: 175361: 389f6c85f08393377cb843d2d049019211d427a2 175359: e3cdc93e659c2d7657be454cd0b410f302ac7e5a v: v3 --- [refs] | 2 +- trunk/drivers/char/tty_io.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) 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 ? */