alistair23-linux/kernel
Eric W. Biederman 04a2e6a5cb [PATCH] pid: make session_of_pgrp use struct pid instead of pid_t
To properly implement a pid namespace I need to deal exclusively in terms of
struct pid, because pid_t values become ambiguous.

To this end session_of_pgrp is transformed to take and return a struct pid
pointer.  To avoid the need to worry about reference counting I now require my
caller to hold the appropriate locks.  Leaving callers repsonsible for
increasing the reference count if they need access to the result outside of
the locks.

Since session_of_pgrp currently only has one caller and that caller simply
uses only test the result for equality with another process group, the locking
change means I don't actually have to acquire the tasklist_lock at all.

tiocspgrp is also modified to take and release the lock.  The logic there is a
little more complicated but nothing I won't need when I convert pgrp of a tty
to a struct pid pointer.

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: Oleg Nesterov <oleg@tv-sign.ru>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-02-12 09:48:31 -08:00
..
irq [PATCH] kernel: shut up the IRQ mismatch messages 2007-02-12 09:48:28 -08:00
power [PATCH] swsusp: Change pm_ops handling by userland interface 2007-02-11 10:51:20 -08:00
time [PATCH] kernel/time/clocksource.c needs struct task_struct on m68k 2007-02-11 10:51:20 -08:00
.gitignore
acct.c [PATCH] kernel: change uses of f_{dentry, vfsmnt} to use f_path 2006-12-08 08:28:42 -08:00
audit.c
audit.h
auditfilter.c [PATCH] audit: fix audit_filter_user_rules() initialization bug 2007-02-11 10:51:34 -08:00
auditsc.c [PATCH] struct path: convert kernel 2006-12-08 08:28:46 -08:00
capability.c
compat.c [PATCH] Common compat_sys_sysinfo 2007-02-11 10:51:32 -08:00
configs.c [PATCH] struct seq_operations and struct file_operations constification 2006-12-07 08:39:46 -08:00
cpu.c [PATCH] swsusp: Change code ordering in disk.c 2007-02-11 10:51:19 -08:00
cpuset.c [PATCH] cpuset procfs warning fix 2006-12-30 10:56:43 -08:00
delayacct.c
dma.c [PATCH] struct seq_operations and struct file_operations constification 2006-12-07 08:39:46 -08:00
exec_domain.c
exit.c [PATCH] pid: make session_of_pgrp use struct pid instead of pid_t 2007-02-12 09:48:31 -08:00
extable.c
fork.c [PATCH] ifdef ->rchar, ->wchar, ->syscr, ->syscw from task_struct 2007-02-11 11:18:07 -08:00
futex.c [PATCH] kernel: change uses of f_{dentry, vfsmnt} to use f_path 2006-12-08 08:28:42 -08:00
futex_compat.c
hrtimer.c [PATCH] Numerous fixes to kernel-doc info in source files. 2007-02-11 10:51:32 -08:00
itimer.c
kallsyms.c [PATCH] move kallsyms data to .rodata 2006-12-08 08:28:37 -08:00
Kconfig.hz
Kconfig.preempt
kexec.c Merge branch 'release' of master.kernel.org:/pub/scm/linux/kernel/git/aegl/linux-2.6 2006-12-07 15:39:22 -08:00
kfifo.c [PATCH] Numerous fixes to kernel-doc info in source files. 2007-02-11 10:51:32 -08:00
kmod.c [PATCH] rename struct namespace to struct mnt_namespace 2006-12-08 08:28:51 -08:00
kprobes.c [PATCH] kprobes: replace magic numbers with enum 2007-01-30 16:01:35 -08:00
ksysfs.c
kthread.c [PATCH] Numerous fixes to kernel-doc info in source files. 2007-02-11 10:51:32 -08:00
latency.c
lockdep.c [PATCH] lockdep: add graph depth information to /proc/lockdep 2007-02-11 10:51:26 -08:00
lockdep_internals.h
lockdep_proc.c [PATCH] Fix apparent typo CONFIG_LOCKDEP_DEBUG 2007-02-11 11:18:06 -08:00
Makefile Remove stack unwinder for now 2006-12-15 08:47:51 -08:00
module.c /sys/modules/*/holders 2007-02-07 10:37:12 -08:00
mutex-debug.c
mutex-debug.h
mutex.c [PATCH] lockdep: avoid lockdep warning in md 2006-12-08 08:28:39 -08:00
mutex.h
nsproxy.c Revert "[PATCH] namespaces: fix exit race by splitting exit" 2007-01-30 13:35:18 -08:00
panic.c [PATCH] Add TAINT_USER and ability to set taint flags from userspace 2007-02-11 10:51:29 -08:00
params.c /sys/modules/*/holders 2007-02-07 10:37:12 -08:00
pid.c [PATCH] namespaces: fix task exit disaster 2007-01-30 13:40:36 -08:00
posix-cpu-timers.c
posix-timers.c [PATCH] Transform kmem_cache_alloc()+memset(0) -> kmem_cache_zalloc(). 2007-02-11 10:51:27 -08:00
printk.c [PATCH] order of lockdep off/on in vprintk() should be changed 2007-02-11 11:18:06 -08:00
profile.c [PATCH] proc: remove useless (and buggy) ->nlink settings 2007-02-11 10:51:32 -08:00
ptrace.c
rcupdate.c
rcutorture.c [PATCH] rcu: rcutorture suspend fix 2006-12-30 10:55:55 -08:00
relay.c [PATCH] Numerous fixes to kernel-doc info in source files. 2007-02-11 10:51:32 -08:00
resource.c devres: device resource management 2007-02-09 17:39:36 -05:00
rtmutex-debug.c
rtmutex-debug.h
rtmutex-tester.c
rtmutex.c
rtmutex.h
rtmutex_common.h
rwsem.c
sched.c [PATCH] Numerous fixes to kernel-doc info in source files. 2007-02-11 10:51:32 -08:00
seccomp.c
signal.c [PATCH] signal: rewrite kill_something_info so it uses newer helpers 2007-02-12 09:48:31 -08:00
softirq.c
softlockup.c
spinlock.c
srcu.c
stacktrace.c
stop_machine.c
sys.c [PATCH] Numerous fixes to kernel-doc info in source files. 2007-02-11 10:51:32 -08:00
sys_ni.c
sysctl.c [PATCH] _proc_do_string(): fix short reads 2007-02-11 11:18:07 -08:00
taskstats.c
time.c
timer.c [PATCH] Common compat_sys_sysinfo 2007-02-11 10:51:32 -08:00
tsacct.c [PATCH] io-accounting: via taskstats 2006-12-10 09:55:41 -08:00
uid16.c
user.c
utsname.c
wait.c
workqueue.c [PATCH] Numerous fixes to kernel-doc info in source files. 2007-02-11 10:51:32 -08:00