aboutsummaryrefslogtreecommitdiffstats
path: root/security/selinux/hooks.c
diff options
context:
space:
mode:
Diffstat (limited to 'security/selinux/hooks.c')
-rw-r--r--security/selinux/hooks.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/security/selinux/hooks.c b/security/selinux/hooks.c
index 42043f96e54f..bd7da0f0ccf3 100644
--- a/security/selinux/hooks.c
+++ b/security/selinux/hooks.c
@@ -2170,7 +2170,7 @@ static inline void flush_unauthorized_files(const struct cred *cred,
2170 2170
2171 tty = get_current_tty(); 2171 tty = get_current_tty();
2172 if (tty) { 2172 if (tty) {
2173 file_list_lock(); 2173 spin_lock(&tty_files_lock);
2174 if (!list_empty(&tty->tty_files)) { 2174 if (!list_empty(&tty->tty_files)) {
2175 struct inode *inode; 2175 struct inode *inode;
2176 2176
@@ -2186,7 +2186,7 @@ static inline void flush_unauthorized_files(const struct cred *cred,
2186 drop_tty = 1; 2186 drop_tty = 1;
2187 } 2187 }
2188 } 2188 }
2189 file_list_unlock(); 2189 spin_unlock(&tty_files_lock);
2190 tty_kref_put(tty); 2190 tty_kref_put(tty);
2191 } 2191 }
2192 /* Reset controlling tty. */ 2192 /* Reset controlling tty. */