aboutsummaryrefslogtreecommitdiffstats
path: root/security/selinux
diff options
context:
space:
mode:
Diffstat (limited to 'security/selinux')
-rw-r--r--security/selinux/hooks.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/security/selinux/hooks.c b/security/selinux/hooks.c
index c679ba653e1d..88f19536efad 100644
--- a/security/selinux/hooks.c
+++ b/security/selinux/hooks.c
@@ -2122,7 +2122,6 @@ static inline void flush_unauthorized_files(struct files_struct *files)
2122 long j = -1; 2122 long j = -1;
2123 int drop_tty = 0; 2123 int drop_tty = 0;
2124 2124
2125 mutex_lock(&tty_mutex);
2126 tty = get_current_tty(); 2125 tty = get_current_tty();
2127 if (tty) { 2126 if (tty) {
2128 file_list_lock(); 2127 file_list_lock();
@@ -2140,8 +2139,8 @@ static inline void flush_unauthorized_files(struct files_struct *files)
2140 } 2139 }
2141 } 2140 }
2142 file_list_unlock(); 2141 file_list_unlock();
2142 tty_kref_put(tty);
2143 } 2143 }
2144 mutex_unlock(&tty_mutex);
2145 /* Reset controlling tty. */ 2144 /* Reset controlling tty. */
2146 if (drop_tty) 2145 if (drop_tty)
2147 no_tty(); 2146 no_tty();