aboutsummaryrefslogtreecommitdiffstats
path: root/security/selinux
diff options
context:
space:
mode:
authorAlan Cox <alan@redhat.com>2008-10-13 05:40:43 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2008-10-13 12:51:41 -0400
commit934e6ebf96e8c1a0f299e64129fdaebc1132a427 (patch)
treeab4bd754997b097f06a5cfefd9e3671d56e628f4 /security/selinux
parent2cb5998b5f0ccc886fdda3509059eef297b49577 (diff)
tty: Redo current tty locking
Currently it is sometimes locked by the tty mutex and sometimes by the sighand lock. The latter is in fact correct and now we can hand back referenced objects we can fix this up without problems around sleeping functions. Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'security/selinux')
-rw-r--r--security/selinux/hooks.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/security/selinux/hooks.c b/security/selinux/hooks.c
index 089d61a23952..48881394fbd4 100644
--- a/security/selinux/hooks.c
+++ b/security/selinux/hooks.c
@@ -2121,9 +2121,7 @@ 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 mutex_unlock(&tty_mutex);
2127 if (tty) { 2125 if (tty) {
2128 file_list_lock(); 2126 file_list_lock();
2129 file = list_entry(tty->tty_files.next, typeof(*file), f_u.fu_list); 2127 file = list_entry(tty->tty_files.next, typeof(*file), f_u.fu_list);