aboutsummaryrefslogtreecommitdiffstats
path: root/ipc/util.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2014-06-06 19:35:10 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2014-06-06 19:35:10 -0400
commit57d326169e878a1a37b2bccd1cf81f6809ee67b9 (patch)
tree86ed74ae4dc2beaebce1c67b8459f1873b777d3a /ipc/util.c
parent7b215de3d0abbc4f6daf2efd19e8809af0564490 (diff)
parent0244756edc4b98c129e92c7061d9f383708cf786 (diff)
Merge branch 'akpm' (patches from Andrew Morton) into next
Merge more updates from Andrew Morton: - Most of the rest of MM. This includes "mark remap_file_pages syscall as deprecated" but the actual "replace remap_file_pages syscall with emulation" is held back. I guess we'll need to work out when to pull the trigger on that one. - various minor cleanups to obscure filesystems - the drivers/rtc queue - hfsplus updates - ufs, hpfs, fatfs, affs, reiserfs - Documentation/ - signals - procfs - cpu hotplug - lib/idr.c - rapidio - sysctl - ipc updates * emailed patches from Andrew Morton <akpm@linux-foundation.org>: (171 commits) ufs: sb mutex merge + mutex_destroy powerpc: update comments for generic idle conversion cris: update comments for generic idle conversion idle: remove cpu_idle() forward declarations nbd: zero from and len fields in NBD_CMD_DISCONNECT. mm: convert some level-less printks to pr_* MAINTAINERS: adi-buildroot-devel is moderated MAINTAINERS: add linux-api for review of API/ABI changes mm/kmemleak-test.c: use pr_fmt for logging fs/dlm/debug_fs.c: replace seq_printf by seq_puts fs/dlm/lockspace.c: convert simple_str to kstr fs/dlm/config.c: convert simple_str to kstr mm: mark remap_file_pages() syscall as deprecated mm: memcontrol: remove unnecessary memcg argument from soft limit functions mm: memcontrol: clean up memcg zoneinfo lookup mm/memblock.c: call kmemleak directly from memblock_(alloc|free) mm/mempool.c: update the kmemleak stack trace for mempool allocations lib/radix-tree.c: update the kmemleak stack trace for radix tree allocations mm: introduce kmemleak_update_trace() mm/kmemleak.c: use %u to print ->checksum ...
Diffstat (limited to 'ipc/util.c')
-rw-r--r--ipc/util.c12
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 */
319static int ipcget_new(struct ipc_namespace *ns, struct ipc_ids *ids, 319static 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 */
345static int ipc_check_perms(struct ipc_namespace *ns, 345static 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 */
377static int ipcget_public(struct ipc_namespace *ns, struct ipc_ids *ids, 377static 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 */
680int ipcget(struct ipc_namespace *ns, struct ipc_ids *ids, 680int 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);