diff options
Diffstat (limited to 'security')
-rw-r--r-- | security/selinux/hooks.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/security/selinux/hooks.c b/security/selinux/hooks.c index 4a7374c12d9c..48881394fbd4 100644 --- a/security/selinux/hooks.c +++ b/security/selinux/hooks.c | |||
@@ -2121,7 +2121,6 @@ static inline void flush_unauthorized_files(struct files_struct *files) | |||
2121 | long j = -1; | 2121 | long j = -1; |
2122 | int drop_tty = 0; | 2122 | int drop_tty = 0; |
2123 | 2123 | ||
2124 | mutex_lock(&tty_mutex); | ||
2125 | tty = get_current_tty(); | 2124 | tty = get_current_tty(); |
2126 | if (tty) { | 2125 | if (tty) { |
2127 | file_list_lock(); | 2126 | file_list_lock(); |
@@ -2139,8 +2138,8 @@ static inline void flush_unauthorized_files(struct files_struct *files) | |||
2139 | } | 2138 | } |
2140 | } | 2139 | } |
2141 | file_list_unlock(); | 2140 | file_list_unlock(); |
2141 | tty_kref_put(tty); | ||
2142 | } | 2142 | } |
2143 | mutex_unlock(&tty_mutex); | ||
2144 | /* Reset controlling tty. */ | 2143 | /* Reset controlling tty. */ |
2145 | if (drop_tty) | 2144 | if (drop_tty) |
2146 | no_tty(); | 2145 | no_tty(); |