kernel-ark/ipc
Manfred Spraul 380af1b33b ipc/sem.c: rewrite undo list locking
The attached patch:
- reverses the locking order of ulp->lock and sem_lock:
  Previously, it was first ulp->lock, then inside sem_lock.
  Now it's the other way around.
- converts the undo structure to rcu.

Benefits:
- With the old locking order, IPC_RMID could not kfree the undo structures.
  The stale entries remained in the linked lists and were released later.
- The patch fixes a a race in semtimedop(): if both IPC_RMID and a semget() that
  recreates exactly the same id happen between find_alloc_undo() and sem_lock,
  then semtimedop() would access already kfree'd memory.

[akpm@linux-foundation.org: coding-style fixes]
Signed-off-by: Manfred Spraul <manfred@colorfullife.com>
Reviewed-by: Nadia Derbey <Nadia.Derbey@bull.net>
Cc: Pierre Peiffer <peifferp@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-07-25 10:53:42 -07:00
..
compat_mq.c
compat.c fix logic error in ipc compat semctl() 2007-07-06 10:23:43 -07:00
ipc_sysctl.c ipc: re-enable msgmni automatic recomputing msgmni if set to negative 2008-04-29 08:06:13 -07:00
ipcns_notifier.c ipc: re-enable msgmni automatic recomputing msgmni if set to negative 2008-04-29 08:06:13 -07:00
Makefile ipc: recompute msgmni on ipc namespace creation/removal 2008-04-29 08:06:12 -07:00
mqueue.c netlink: Remove nonblock parameter from netlink_attachskb 2008-06-05 11:23:39 -07:00
msg.c ipc: only output msgmni value at boot time 2008-06-06 11:29:12 -07:00
msgutil.c [PATCH] getting rid of all casts of k[cmz]alloc() calls 2006-12-13 09:05:58 -08:00
namespace.c ipc: recompute msgmni on ipc namespace creation/removal 2008-04-29 08:06:12 -07:00
sem.c ipc/sem.c: rewrite undo list locking 2008-07-25 10:53:42 -07:00
shm.c ipc: get rid of ipc_lock_down() 2008-07-25 10:53:42 -07:00
util.c ipc: get rid of ipc_lock_down() 2008-07-25 10:53:42 -07:00
util.h ipc: get rid of ipc_lock_down() 2008-07-25 10:53:42 -07:00