Skip to contentSkip to conversation

ipc-update-locking-scheme-comments.patch removed from -mm tree

merged [email protected] 1 participant 1 message Oct 17, 2013

lore
Share & tools
lore
#0 lore raw

Subject: [merged] ipc-update-locking-scheme-comments.patch removed from -mm tree
To: [email protected],[email protected],[email protected]
From: [email protected]
Date: Thu, 17 Oct 2013 11:12:55 -0700

The patch titled
Subject: ipc: update locking scheme comments
has been removed from the -mm tree. Its filename was
ipc-update-locking-scheme-comments.patch

This patch was dropped because it was merged into mainline or a subsystem tree

------------------------------------------------------
From: Davidlohr Bueso <[email protected]>
Subject: ipc: update locking scheme comments

The initial documentation was a bit incomplete, update accordingly.

---

 ipc/util.c |   27 +++++++++++++++++++++------
 1 file changed, 21 insertions(+), 6 deletions(-)
ipc/util.c renamed from ipc/util.c~ipc-update-locking-scheme-comments +21 -6
diff -puN ipc/util.c~ipc-update-locking-scheme-comments ipc/util.c
@@ -17,12 +17,27 @@
  *            Pavel Emelianov <[email protected]>
  *
  * General sysv ipc locking scheme:
- *  when doing ipc id lookups, take the ids->rwsem
- *      rcu_read_lock()
- *          obtain the ipc object (kern_ipc_perm)
- *          perform security, capabilities, auditing and permission checks, etc.
- *          acquire the ipc lock (kern_ipc_perm.lock) throught ipc_lock_object()
- *             perform data updates (ie: SET, RMID, LOCK/UNLOCK commands)
+ *	rcu_read_lock()
+ *          obtain the ipc object (kern_ipc_perm) by looking up the id in an idr
+ *	    tree.
+ *	    - perform initial checks (capabilities, auditing and permission,
+ *	      etc).
+ *	    - perform read-only operations, such as STAT, INFO commands.
+ *	      acquire the ipc lock (kern_ipc_perm.lock) through
+ *	      ipc_lock_object()
+ *		- perform data updates, such as SET, RMID commands and
+ *		  mechanism-specific operations (semop/semtimedop,
+ *		  msgsnd/msgrcv, shmat/shmdt).
+ *	    drop the ipc lock, through ipc_unlock_object().
+ *	rcu_read_unlock()
+ *
+ *  The ids->rwsem must be taken when:
+ *	- creating, removing and iterating the existing entries in ipc
+ *	  identifier sets.
+ *	- iterating through /proc/sysvipc/* files.
+ *
+ *  Note that sems have a special fast path that avoids kern_ipc_perm.lock -
+ *  see sem_lock().
  */
 
 #include <linux/mm.h>

_

Patches currently in -mm which might be from [email protected] are

origin.patch