]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - security/selinux/hooks.c
tty: Redo current tty locking
[linux-2.6-omap-h63xx.git] / security / selinux / hooks.c
index 4a7374c12d9ca5a2b9c76c1101ecb42ee44b48af..48881394fbd401a356d4e313ea19473132c1c187 100644 (file)
@@ -2121,7 +2121,6 @@ static inline void flush_unauthorized_files(struct files_struct *files)
        long j = -1;
        int drop_tty = 0;
 
-       mutex_lock(&tty_mutex);
        tty = get_current_tty();
        if (tty) {
                file_list_lock();
@@ -2139,8 +2138,8 @@ static inline void flush_unauthorized_files(struct files_struct *files)
                        }
                }
                file_list_unlock();
+               tty_kref_put(tty);
        }
-       mutex_unlock(&tty_mutex);
        /* Reset controlling tty. */
        if (drop_tty)
                no_tty();