dect
/
linux-2.6
Archived
13
0
Fork 0
This repository has been archived on 2022-02-17. You can view files and clone it, but cannot push or open issues or pull requests.
linux-2.6/arch/sparc64
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
..
boot [SPARC64]: Add .gitignore file for sparc64 boot images. 2006-02-05 00:15:11 -08:00
kernel Merge branch 'for-linus' of git://one.firstfloor.org/home/andi/git/linux-2.6 2006-12-07 08:59:11 -08:00
lib Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
math-emu [SPARC64] math-emu: Delete debugging printk left by previous commit. 2006-03-20 01:13:53 -08:00
mm [PATCH] slab: remove kmem_cache_t 2006-12-07 08:39:25 -08:00
oprofile [PATCH] Move Kprobes and Oprofile to "Instrumentation Support" menu 2005-11-07 07:53:35 -08:00
prom [SPARC]: Kill prom_getname, unused and not implemented properly. 2006-07-21 14:17:55 -07:00
solaris [PATCH] tty: ->signal->tty locking 2006-12-08 08:28:38 -08:00
Kconfig [PATCH] Kprobes: Make kprobe modules more portable 2006-10-02 07:57:16 -07:00
Kconfig.debug [PATCH] kconfig: clarify memory debug options 2006-03-25 08:22:54 -08:00
Makefile [SPARC64]: Stop putting -finline-limit=XXX into CFLAGS 2005-12-20 14:53:05 -08:00
defconfig [SPARC64]: Update defconfig. 2006-10-17 19:29:41 -07:00