android_kernel_xiaomi_sm8350/ipc
Nadia Derbey 3e148c7993 fix idr_find() locking
This is a patch that fixes the way idr_find() used to be called in ipc_lock():
in all the paths that don't imply an update of the ipcs idr, it was called
without the idr tree being locked.

The changes are:
  . in ipc_ids, the mutex has been changed into a reader/writer semaphore.
  . ipc_lock() now takes the mutex as a reader during the idr_find().
  . a new routine ipc_lock_down() has been defined: it doesn't take the
    mutex, assuming that it is being held by the caller. This is the routine
    that is now called in all the update paths.

Signed-off-by: Nadia Derbey <Nadia.Derbey@bull.net>
Acked-by: Jarek Poplawski <jarkao2@o2.pl>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-10-19 11:53:48 -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 namespace: remove config ipc ns fix 2007-10-17 08:42:57 -07:00
Makefile
mqueue.c pid namespaces: changes to show virtual ids to user 2007-10-19 11:53:40 -07:00
msg.c fix idr_find() locking 2007-10-19 11:53:48 -07:00
msgutil.c
sem.c fix idr_find() locking 2007-10-19 11:53:48 -07:00
shm.c fix idr_find() locking 2007-10-19 11:53:48 -07:00
util.c fix idr_find() locking 2007-10-19 11:53:48 -07:00
util.h fix idr_find() locking 2007-10-19 11:53:48 -07:00