The patch titled selinux: fix tty locking has been added to the -mm tree. Its filename is selinux-fix-tty-locking.patch See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find out what to do about this ------------------------------------------------------ Subject: selinux: fix tty locking From: Stephen Smalley <sds@xxxxxxxxxxxxx> Take tty_mutex when accessing ->signal->tty in selinux code. Noted by Alan Cox. Longer term, we are looking at refactoring the code to provide better encapsulation of the tty layer, but this is a simple fix that addresses the immediate bug. Signed-off-by: Stephen Smalley <sds@xxxxxxxxxxxxx> Acked-by: Alan Cox <alan@xxxxxxxxxx> Acked-by: James Morris <jmorris@xxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxx> --- security/selinux/hooks.c | 5 ++++- 1 files changed, 4 insertions(+), 1 deletion(-) diff -puN security/selinux/hooks.c~selinux-fix-tty-locking security/selinux/hooks.c --- a/security/selinux/hooks.c~selinux-fix-tty-locking +++ a/security/selinux/hooks.c @@ -1687,10 +1687,12 @@ static inline void flush_unauthorized_fi { struct avc_audit_data ad; struct file *file, *devnull = NULL; - struct tty_struct *tty = current->signal->tty; + struct tty_struct *tty; struct fdtable *fdt; long j = -1; + mutex_lock(&tty_mutex); + tty = current->signal->tty; if (tty) { file_list_lock(); file = list_entry(tty->tty_files.next, typeof(*file), f_u.fu_list); @@ -1710,6 +1712,7 @@ static inline void flush_unauthorized_fi } file_list_unlock(); } + mutex_unlock(&tty_mutex); /* Revalidate access to inherited open files. */ _ Patches currently in -mm which might be from sds@xxxxxxxxxxxxx are selinux-eliminate-selinux_task_ctxid.patch selinux-rename-selinux_ctxid_to_string.patch selinux-replace-ctxid-with-sid-in.patch selinux-enable-configuration-of-max-policy-version.patch selinux-add-support-for-range-transitions-on-object.patch selinux-1-3-eliminate-inode_security_set_security.patch selinux-2-3-change-isec-semaphore-to-a-mutex.patch selinux-3-3-convert-sbsec-semaphore-to-a-mutex.patch selinux-fix-tty-locking.patch fsh-ifdef-security-fields.patch - To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html