diff options
author | Nadia Derbey <Nadia.Derbey@bull.net> | 2007-10-19 02:40:53 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-10-19 14:53:47 -0400 |
commit | f4566f04854d78acfc74b9acb029744acde9d033 (patch) | |
tree | 6fa631076d11511e2d9685b23c195835c31f4900 /ipc/sem.c | |
parent | 28028313134e9f11e49f74a4beaa47c91e5ebf06 (diff) |
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.c | 14 |
1 files changed, 14 insertions, 0 deletions
@@ -228,6 +228,14 @@ static inline void sem_rmid(struct ipc_namespace *ns, struct sem_array *s) | |||
228 | */ | 228 | */ |
229 | #define IN_WAKEUP 1 | 229 | #define IN_WAKEUP 1 |
230 | 230 | ||
231 | /** | ||
232 | * newary - Create a new semaphore set | ||
233 | * @ns: namespace | ||
234 | * @params: ptr to the structure that contains key, semflg and nsems | ||
235 | * | ||
236 | * Called with sem_ids.mutex held | ||
237 | */ | ||
238 | |||
231 | static int newary(struct ipc_namespace *ns, struct ipc_params *params) | 239 | static int newary(struct ipc_namespace *ns, struct ipc_params *params) |
232 | { | 240 | { |
233 | int id; | 241 | int id; |
@@ -281,6 +289,9 @@ static int newary(struct ipc_namespace *ns, struct ipc_params *params) | |||
281 | } | 289 | } |
282 | 290 | ||
283 | 291 | ||
292 | /* | ||
293 | * Called with sem_ids.mutex and ipcp locked. | ||
294 | */ | ||
284 | static inline int sem_security(struct kern_ipc_perm *ipcp, int semflg) | 295 | static inline int sem_security(struct kern_ipc_perm *ipcp, int semflg) |
285 | { | 296 | { |
286 | struct sem_array *sma; | 297 | struct sem_array *sma; |
@@ -289,6 +300,9 @@ static inline int sem_security(struct kern_ipc_perm *ipcp, int semflg) | |||
289 | return security_sem_associate(sma, semflg); | 300 | return security_sem_associate(sma, semflg); |
290 | } | 301 | } |
291 | 302 | ||
303 | /* | ||
304 | * Called with sem_ids.mutex and ipcp locked. | ||
305 | */ | ||
292 | static inline int sem_more_checks(struct kern_ipc_perm *ipcp, | 306 | static inline int sem_more_checks(struct kern_ipc_perm *ipcp, |
293 | struct ipc_params *params) | 307 | struct ipc_params *params) |
294 | { | 308 | { |