+ ipc-update-locking-scheme-comments.patch added to -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Subject: + ipc-update-locking-scheme-comments.patch added to -mm tree
To: davidlohr@xxxxxx,manfred@xxxxxxxxxxxxxxxx
From: akpm@xxxxxxxxxxxxxxxxxxxx
Date: Thu, 03 Oct 2013 12:36:40 -0700


The patch titled
     Subject: ipc: update locking scheme comments
has been added to the -mm tree.  Its filename is
     ipc-update-locking-scheme-comments.patch

This patch should soon appear at
    http://ozlabs.org/~akpm/mmots/broken-out/ipc-update-locking-scheme-comments.patch
and later at
    http://ozlabs.org/~akpm/mmotm/broken-out/ipc-update-locking-scheme-comments.patch

Before you just go and hit "reply", please:
   a) Consider who else should be cc'ed
   b) Prefer to cc a suitable mailing list as well
   c) Ideally: find the original patch on the mailing list and do a
      reply-to-all to that, adding suitable additional cc's

*** Remember to use Documentation/SubmitChecklist when testing your code ***

The -mm tree is included into linux-next and is updated
there every 3-4 working days

------------------------------------------------------
From: Davidlohr Bueso <davidlohr@xxxxxx>
Subject: ipc: update locking scheme comments

The initial documentation was a bit incomplete, update accordingly.

Signed-off-by: Davidlohr Bueso <davidlohr@xxxxxx>
Acked-by: Manfred Spraul <manfred@xxxxxxxxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

 ipc/util.c |   19 ++++++++++++++-----
 1 file changed, 14 insertions(+), 5 deletions(-)

diff -puN ipc/util.c~ipc-update-locking-scheme-comments ipc/util.c
--- a/ipc/util.c~ipc-update-locking-scheme-comments
+++ a/ipc/util.c
@@ -17,12 +17,21 @@
  *            Pavel Emelianov <xemul@xxxxxxxxxx>
  *
  * 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)
+ *          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 davidlohr@xxxxxx are

origin.patch
ipc-update-locking-scheme-comments.patch

--
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Kernel Newbies FAQ]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux