diff options
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 | { |