android_kernel_motorola_sm6225/arch/um/kernel
Peter Zijlstra 24ec839c43 [PATCH] tty: ->signal->tty locking
Fix the locking of signal->tty.

Use ->sighand->siglock to protect ->signal->tty; this lock is already used
by most other members of ->signal/->sighand.  And unless we are 'current'
or the tasklist_lock is held we need ->siglock to access ->signal anyway.

(NOTE: sys_unshare() is broken wrt ->sighand locking rules)

Note that tty_mutex is held over tty destruction, so while holding
tty_mutex any tty pointer remains valid.  Otherwise the lifetime of ttys
are governed by their open file handles.  This leaves some holes for tty
access from signal->tty (or any other non file related tty access).

It solves the tty SLAB scribbles we were seeing.

(NOTE: the change from group_send_sig_info to __group_send_sig_info needs to
       be examined by someone familiar with the security framework, I think
       it is safe given the SEND_SIG_PRIV from other __group_send_sig_info
       invocations)

[schwidefsky@de.ibm.com: 3270 fix]
[akpm@osdl.org: various post-viro fixes]
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Acked-by: Alan Cox <alan@redhat.com>
Cc: Oleg Nesterov <oleg@tv-sign.ru>
Cc: Prarit Bhargava <prarit@redhat.com>
Cc: Chris Wright <chrisw@sous-sol.org>
Cc: Roland McGrath <roland@redhat.com>
Cc: Stephen Smalley <sds@tycho.nsa.gov>
Cc: James Morris <jmorris@namei.org>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Jeff Dike <jdike@addtoit.com>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: Jan Kara <jack@ucw.cz>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-08 08:28:38 -08:00
..
skas [PATCH] uml: correct removal of pte_mkexec 2006-10-11 11:14:20 -07:00
tt [PATCH] uml ubd driver: various little changes 2006-10-31 08:07:00 -08:00
asm-offsets.c [PATCH] uml: fix missing KBUILD_BASENAME 2006-01-11 18:42:09 -08:00
config.c.in Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
dyn.lds.S [PATCH] uml: add _text definition to linker scripts 2006-10-31 08:07:00 -08:00
exec.c [PATCH] tty: ->signal->tty locking 2006-12-08 08:28:38 -08:00
exitcode.c [PATCH] uml: locking documentation 2006-09-29 09:18:04 -07:00
gmon_syms.c [PATCH] uml: fix gcov support 2006-09-27 08:26:16 -07:00
gprof_syms.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
init_task.c Remove all inclusions of <linux/config.h> 2006-10-04 03:38:54 -04:00
initrd.c [PATCH] uml: initrd cleanup 2005-05-20 15:48:18 -07:00
irq.c [PATCH] uml: split memory allocation prototypes out of user.h 2006-10-20 10:26:36 -07:00
ksyms.c Remove all inclusions of <linux/config.h> 2006-10-04 03:38:54 -04:00
Makefile [PATCH] uml: file renaming 2006-09-27 08:26:16 -07:00
mem.c [PATCH] uml: get rid of ZONE_DMA use 2006-09-27 08:26:15 -07:00
physmem.c [PATCH] uml: fix static binary segfault 2006-07-10 13:24:23 -07:00
process.c [PATCH] uml: split memory allocation prototypes out of user.h 2006-10-20 10:26:36 -07:00
ptrace.c [PATCH] drop task argument of audit_syscall_{entry,exit} 2006-05-01 06:06:18 -04:00
reboot.c [PATCH] uml: Use ARRAY_SIZE more assiduously 2006-09-26 08:49:05 -07:00
resource.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
sigio.c [PATCH] uml pt_regs fixes 2006-10-08 16:34:08 -07:00
signal.c Remove all inclusions of <linux/config.h> 2006-10-04 03:38:54 -04:00
smp.c Remove all inclusions of <linux/config.h> 2006-10-04 03:38:54 -04:00
syscall.c [PATCH] rename the provided execve functions to kernel_execve 2006-10-02 07:57:23 -07:00
sysrq.c Remove all inclusions of <linux/config.h> 2006-10-04 03:38:54 -04:00
time.c [PATCH] uml pt_regs fixes 2006-10-08 16:34:08 -07:00
tlb.c [PATCH] uml: Whitespace fixes 2006-09-26 08:49:06 -07:00
trap.c Remove all inclusions of <linux/config.h> 2006-10-04 03:38:54 -04:00
uaccess.c [PATCH] uml: separate libc-dependent uaccess code 2005-11-07 07:53:31 -08:00
um_arch.c Remove all inclusions of <linux/config.h> 2006-10-04 03:38:54 -04:00
umid.c [PATCH] uml: umid cleanup 2006-01-06 08:33:47 -08:00
uml.lds.S [PATCH] uml: add _text definition to linker scripts 2006-10-31 08:07:00 -08:00
vmlinux.lds.S [PATCH] uml: tidy biarch gcc support 2006-07-14 21:53:52 -07:00