]> git.hungrycats.org Git - linux/commit
[PATCH] ipc: Add refcount to ipc_rcu_alloc
authorManfred Spraul <manfred@colorfullife.com>
Mon, 23 Aug 2004 05:40:37 +0000 (22:40 -0700)
committerLinus Torvalds <torvalds@ppc970.osdl.org>
Mon, 23 Aug 2004 05:40:37 +0000 (22:40 -0700)
commit3a4262a016085f178811ec2459b93f63127e6280
tree6690174cb38e6beeb555a1b4ea092881f5886d6f
parent83d2e628308699bc28cfde1eb6704df1645afdac
[PATCH] ipc: Add refcount to ipc_rcu_alloc

The lifetime of the ipc objects (sem array, msg queue, shm mapping) is
controlled by kern_ipc_perms->lock - a spinlock.  There is no simple way to
reacquire this spinlock after it was dropped to
schedule()/kmalloc/copy_{to,from}_user/whatever.

The attached patch adds a reference count as a preparation to get rid of
sem_revalidate().

Signed-Off-By: Manfred Spraul <manfred@colorfullife.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
ipc/msg.c
ipc/sem.c
ipc/shm.c
ipc/util.c
ipc/util.h