summaryrefslogtreecommitdiff
path: root/ipc/sem.c
diff options
context:
space:
mode:
authorNadia Derbey <Nadia.Derbey@bull.net>2007-10-18 23:40:53 -0700
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-10-19 11:53:47 -0700
commitf4566f04854d78acfc74b9acb029744acde9d033 (patch)
tree6fa631076d11511e2d9685b23c195835c31f4900 /ipc/sem.c
parent28028313134e9f11e49f74a4beaa47c91e5ebf06 (diff)
downloadkernel-mfld-blackbay-f4566f04854d78acfc74b9acb029744acde9d033.tar.gz
kernel-mfld-blackbay-f4566f04854d78acfc74b9acb029744acde9d033.tar.bz2
kernel-mfld-blackbay-f4566f04854d78acfc74b9acb029744acde9d033.zip
ipc: fix wrong comments
This patch fixes the wrong / obsolete comments in the ipc code. Also adds a missing lock around ipc_get_maxid() in shm_get_stat(). Signed-off-by: Nadia Derbey <Nadia.Derbey@bull.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'ipc/sem.c')
-rw-r--r--ipc/sem.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/ipc/sem.c b/ipc/sem.c
index 446c8f51804..45c7e573c20 100644
--- a/ipc/sem.c
+++ b/ipc/sem.c
@@ -228,6 +228,14 @@ static inline void sem_rmid(struct ipc_namespace *ns, struct sem_array *s)
*/
#define IN_WAKEUP 1
+/**
+ * newary - Create a new semaphore set
+ * @ns: namespace
+ * @params: ptr to the structure that contains key, semflg and nsems
+ *
+ * Called with sem_ids.mutex held
+ */
+
static int newary(struct ipc_namespace *ns, struct ipc_params *params)
{
int id;
@@ -281,6 +289,9 @@ static int newary(struct ipc_namespace *ns, struct ipc_params *params)
}
+/*
+ * Called with sem_ids.mutex and ipcp locked.
+ */
static inline int sem_security(struct kern_ipc_perm *ipcp, int semflg)
{
struct sem_array *sma;
@@ -289,6 +300,9 @@ static inline int sem_security(struct kern_ipc_perm *ipcp, int semflg)
return security_sem_associate(sma, semflg);
}
+/*
+ * Called with sem_ids.mutex and ipcp locked.
+ */
static inline int sem_more_checks(struct kern_ipc_perm *ipcp,
struct ipc_params *params)
{