diff options
| -rw-r--r-- | drivers/char/tty_io.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/char/tty_io.c b/drivers/char/tty_io.c index c408c81c06a0..cc941a3504d7 100644 --- a/drivers/char/tty_io.c +++ b/drivers/char/tty_io.c | |||
| @@ -505,8 +505,6 @@ static void do_tty_hangup(struct work_struct *work) | |||
| 505 | if (!tty) | 505 | if (!tty) |
| 506 | return; | 506 | return; |
| 507 | 507 | ||
| 508 | /* inuse_filps is protected by the single kernel lock */ | ||
| 509 | lock_kernel(); | ||
| 510 | 508 | ||
| 511 | spin_lock(&redirect_lock); | 509 | spin_lock(&redirect_lock); |
| 512 | if (redirect && redirect->private_data == tty) { | 510 | if (redirect && redirect->private_data == tty) { |
| @@ -515,6 +513,8 @@ static void do_tty_hangup(struct work_struct *work) | |||
| 515 | } | 513 | } |
| 516 | spin_unlock(&redirect_lock); | 514 | spin_unlock(&redirect_lock); |
| 517 | 515 | ||
| 516 | /* inuse_filps is protected by the single kernel lock */ | ||
| 517 | lock_kernel(); | ||
| 518 | check_tty_count(tty, "do_tty_hangup"); | 518 | check_tty_count(tty, "do_tty_hangup"); |
| 519 | file_list_lock(); | 519 | file_list_lock(); |
| 520 | /* This breaks for file handles being sent over AF_UNIX sockets ? */ | 520 | /* This breaks for file handles being sent over AF_UNIX sockets ? */ |
