kernel-ark/ipc
Vasiliy Kulikov 5774ed014f shm: handle separate PID namespaces case
shm_try_destroy_orphaned() and shm_try_destroy_current() didn't handle
the case of separate PID namespaces, but a single IPC namespace.  If
there are tasks with the same PID values using the same shmem object,
the wrong destroy decision could be reached.

On shm segment creation store the pointer to the creator task in
shmid_kernel->shm_creator field and zero it on task exit.  Then
use the ->shm_creator insread of shm_cprid in both functions.  As
shmid_kernel object is already locked at this stage, no additional
locking is needed.

Signed-off-by: Vasiliy Kulikov <segoon@openwall.com>
Acked-by: Serge Hallyn <serge.hallyn@canonical.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-07-30 08:44:19 -10:00
..
compat_mq.c ipc: initialize structure memory to zero for compat functions 2010-10-27 18:03:13 -07:00
compat.c ipc: initialize structure memory to zero for compat functions 2010-10-27 18:03:13 -07:00
ipc_sysctl.c ipc: introduce shm_rmid_forced sysctl 2011-07-26 16:49:44 -07:00
ipcns_notifier.c ipc: do not use a negative value to re-enable msgmni automatic recomputing 2008-07-25 10:53:42 -07:00
Makefile Add generic sys_ipc wrapper 2010-03-12 15:52:32 -08:00
mq_sysctl.c sysctl ipc: Remove dead binary sysctl support code. 2009-11-12 02:04:54 -08:00
mqueue.c ipc/mqueue.c: fix mq_open() return value 2011-07-26 16:49:44 -07:00
msg.c Fix common misspellings 2011-03-31 11:26:23 -03:00
msgutil.c userns: add a user namespace owner of ipc ns 2011-03-23 19:47:07 -07:00
namespace.c ns proc: Add support for the ipc namespace 2011-05-10 14:35:47 -07:00
sem.c ipc/sem.c: fix race with concurrent semtimedop() timeouts and IPC_RMID 2011-07-25 20:57:07 -07:00
shm.c shm: handle separate PID namespaces case 2011-07-30 08:44:19 -10:00
syscall.c ppc64 sys_ipc breakage in 2.6.34-rc2 2010-03-22 09:57:19 -07:00
util.c ipc,rcu: Convert call_rcu(ipc_immediate_free) to kfree_rcu() 2011-07-20 14:10:16 -07:00
util.h userns: user namespaces: convert several capable() calls 2011-03-23 19:47:08 -07:00