diff options
Diffstat (limited to 'ipc/util.c')
-rw-r--r-- | ipc/util.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/ipc/util.c b/ipc/util.c index 2eb0d1eaa312..27d74e69fd57 100644 --- a/ipc/util.c +++ b/ipc/util.c | |||
@@ -183,7 +183,7 @@ void __init ipc_init_proc_interface(const char *path, const char *header, | |||
183 | * ipc_findkey - find a key in an ipc identifier set | 183 | * ipc_findkey - find a key in an ipc identifier set |
184 | * @ids: ipc identifier set | 184 | * @ids: ipc identifier set |
185 | * @key: key to find | 185 | * @key: key to find |
186 | * | 186 | * |
187 | * Returns the locked pointer to the ipc structure if found or NULL | 187 | * Returns the locked pointer to the ipc structure if found or NULL |
188 | * otherwise. If key is found ipc points to the owning ipc structure | 188 | * otherwise. If key is found ipc points to the owning ipc structure |
189 | * | 189 | * |
@@ -317,7 +317,7 @@ int ipc_addid(struct ipc_ids *ids, struct kern_ipc_perm *new, int size) | |||
317 | * when the key is IPC_PRIVATE. | 317 | * when the key is IPC_PRIVATE. |
318 | */ | 318 | */ |
319 | static int ipcget_new(struct ipc_namespace *ns, struct ipc_ids *ids, | 319 | static int ipcget_new(struct ipc_namespace *ns, struct ipc_ids *ids, |
320 | struct ipc_ops *ops, struct ipc_params *params) | 320 | const struct ipc_ops *ops, struct ipc_params *params) |
321 | { | 321 | { |
322 | int err; | 322 | int err; |
323 | 323 | ||
@@ -344,7 +344,7 @@ static int ipcget_new(struct ipc_namespace *ns, struct ipc_ids *ids, | |||
344 | */ | 344 | */ |
345 | static int ipc_check_perms(struct ipc_namespace *ns, | 345 | static int ipc_check_perms(struct ipc_namespace *ns, |
346 | struct kern_ipc_perm *ipcp, | 346 | struct kern_ipc_perm *ipcp, |
347 | struct ipc_ops *ops, | 347 | const struct ipc_ops *ops, |
348 | struct ipc_params *params) | 348 | struct ipc_params *params) |
349 | { | 349 | { |
350 | int err; | 350 | int err; |
@@ -375,7 +375,7 @@ static int ipc_check_perms(struct ipc_namespace *ns, | |||
375 | * On success, the ipc id is returned. | 375 | * On success, the ipc id is returned. |
376 | */ | 376 | */ |
377 | static int ipcget_public(struct ipc_namespace *ns, struct ipc_ids *ids, | 377 | static int ipcget_public(struct ipc_namespace *ns, struct ipc_ids *ids, |
378 | struct ipc_ops *ops, struct ipc_params *params) | 378 | const struct ipc_ops *ops, struct ipc_params *params) |
379 | { | 379 | { |
380 | struct kern_ipc_perm *ipcp; | 380 | struct kern_ipc_perm *ipcp; |
381 | int flg = params->flg; | 381 | int flg = params->flg; |
@@ -538,7 +538,7 @@ int ipcperms(struct ipc_namespace *ns, struct kern_ipc_perm *ipcp, short flag) | |||
538 | else if (in_group_p(ipcp->cgid) || in_group_p(ipcp->gid)) | 538 | else if (in_group_p(ipcp->cgid) || in_group_p(ipcp->gid)) |
539 | granted_mode >>= 3; | 539 | granted_mode >>= 3; |
540 | /* is there some bit set in requested_mode but not in granted_mode? */ | 540 | /* is there some bit set in requested_mode but not in granted_mode? */ |
541 | if ((requested_mode & ~granted_mode & 0007) && | 541 | if ((requested_mode & ~granted_mode & 0007) && |
542 | !ns_capable(ns->user_ns, CAP_IPC_OWNER)) | 542 | !ns_capable(ns->user_ns, CAP_IPC_OWNER)) |
543 | return -1; | 543 | return -1; |
544 | 544 | ||
@@ -678,7 +678,7 @@ out: | |||
678 | * Common routine called by sys_msgget(), sys_semget() and sys_shmget(). | 678 | * Common routine called by sys_msgget(), sys_semget() and sys_shmget(). |
679 | */ | 679 | */ |
680 | int ipcget(struct ipc_namespace *ns, struct ipc_ids *ids, | 680 | int ipcget(struct ipc_namespace *ns, struct ipc_ids *ids, |
681 | struct ipc_ops *ops, struct ipc_params *params) | 681 | const struct ipc_ops *ops, struct ipc_params *params) |
682 | { | 682 | { |
683 | if (params->key == IPC_PRIVATE) | 683 | if (params->key == IPC_PRIVATE) |
684 | return ipcget_new(ns, ids, ops, params); | 684 | return ipcget_new(ns, ids, ops, params); |