diff options
Diffstat (limited to 'security/selinux/hooks.c')
-rw-r--r-- | security/selinux/hooks.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/security/selinux/hooks.c b/security/selinux/hooks.c index 9a2ee845e9d4..f013de205ea8 100644 --- a/security/selinux/hooks.c +++ b/security/selinux/hooks.c | |||
@@ -2246,7 +2246,7 @@ static inline void flush_unauthorized_files(const struct cred *cred, | |||
2246 | 2246 | ||
2247 | tty = get_current_tty(); | 2247 | tty = get_current_tty(); |
2248 | if (tty) { | 2248 | if (tty) { |
2249 | file_list_lock(); | 2249 | spin_lock(&tty_files_lock); |
2250 | if (!list_empty(&tty->tty_files)) { | 2250 | if (!list_empty(&tty->tty_files)) { |
2251 | struct inode *inode; | 2251 | struct inode *inode; |
2252 | 2252 | ||
@@ -2262,7 +2262,7 @@ static inline void flush_unauthorized_files(const struct cred *cred, | |||
2262 | drop_tty = 1; | 2262 | drop_tty = 1; |
2263 | } | 2263 | } |
2264 | } | 2264 | } |
2265 | file_list_unlock(); | 2265 | spin_unlock(&tty_files_lock); |
2266 | tty_kref_put(tty); | 2266 | tty_kref_put(tty); |
2267 | } | 2267 | } |
2268 | /* Reset controlling tty. */ | 2268 | /* Reset controlling tty. */ |