Lines Matching refs:shm_perm
65 ipc_unlock(&(shp)->shm_perm)
92 shp = container_of(ipcp, struct shmid_kernel, shm_perm); in do_shm_rmid()
95 shp->shm_perm.mode |= SHM_DEST; in do_shm_rmid()
97 shp->shm_perm.key = IPC_PRIVATE; in do_shm_rmid()
137 return container_of(ipcp, struct shmid_kernel, shm_perm); in shm_obtain_object()
147 return container_of(ipcp, struct shmid_kernel, shm_perm); in shm_obtain_object_check()
165 return container_of(ipcp, struct shmid_kernel, shm_perm); in shm_lock()
171 ipc_lock_object(&ipcp->shm_perm); in shm_lock_by_ptr()
186 ipc_rmid(&shm_ids(ns), &s->shm_perm); in shm_rmid()
260 (shp->shm_perm.mode & SHM_DEST)); in shm_may_destroy()
303 struct shmid_kernel *shp = container_of(ipcp, struct shmid_kernel, shm_perm); in shm_try_destroy_orphaned()
544 shp->shm_perm.key = key; in newseg()
545 shp->shm_perm.mode = (shmflg & S_IRWXUGO); in newseg()
548 shp->shm_perm.security = NULL; in newseg()
596 id = ipc_addid(&shm_ids(ns), &shp->shm_perm, ns->shm_ctlmni); in newseg()
608 file_inode(file)->i_ino = shp->shm_perm.id; in newseg()
611 error = shp->shm_perm.id; in newseg()
613 ipc_unlock_object(&shp->shm_perm); in newseg()
633 shp = container_of(ipcp, struct shmid_kernel, shm_perm); in shm_security()
645 shp = container_of(ipcp, struct shmid_kernel, shm_perm); in shm_more_checks()
681 ipc64_perm_to_ipc_perm(&in->shm_perm, &out.shm_perm); in copy_shmid_to_user()
712 out->shm_perm.uid = tbuf_old.shm_perm.uid; in copy_shmid_from_user()
713 out->shm_perm.gid = tbuf_old.shm_perm.gid; in copy_shmid_from_user()
714 out->shm_perm.mode = tbuf_old.shm_perm.mode; in copy_shmid_from_user()
798 shp = container_of(ipc, struct shmid_kernel, shm_perm); in shm_get_stat()
828 &shmid64.shm_perm, 0); in shmctl_down()
834 shp = container_of(ipcp, struct shmid_kernel, shm_perm); in shmctl_down()
842 ipc_lock_object(&shp->shm_perm); in shmctl_down()
847 ipc_lock_object(&shp->shm_perm); in shmctl_down()
848 err = ipc_update_perm(&shmid64.shm_perm, ipcp); in shmctl_down()
859 ipc_unlock_object(&shp->shm_perm); in shmctl_down()
936 result = shp->shm_perm.id; in shmctl_nolock()
947 if (ipcperms(ns, &shp->shm_perm, S_IRUGO)) in shmctl_nolock()
955 kernel_to_ipc64_perm(&shp->shm_perm, &tbuf.shm_perm); in shmctl_nolock()
1014 audit_ipc_obj(&(shp->shm_perm)); in SYSCALL_DEFINE3()
1019 ipc_lock_object(&shp->shm_perm); in SYSCALL_DEFINE3()
1022 if (!ipc_valid_object(&shp->shm_perm)) { in SYSCALL_DEFINE3()
1029 if (!uid_eq(euid, shp->shm_perm.uid) && in SYSCALL_DEFINE3()
1030 !uid_eq(euid, shp->shm_perm.cuid)) { in SYSCALL_DEFINE3()
1047 if (!err && !(shp->shm_perm.mode & SHM_LOCKED)) { in SYSCALL_DEFINE3()
1048 shp->shm_perm.mode |= SHM_LOCKED; in SYSCALL_DEFINE3()
1055 if (!(shp->shm_perm.mode & SHM_LOCKED)) in SYSCALL_DEFINE3()
1058 shp->shm_perm.mode &= ~SHM_LOCKED; in SYSCALL_DEFINE3()
1061 ipc_unlock_object(&shp->shm_perm); in SYSCALL_DEFINE3()
1073 ipc_unlock_object(&shp->shm_perm); in SYSCALL_DEFINE3()
1151 if (ipcperms(ns, &shp->shm_perm, acc_mode)) in do_shmat()
1158 ipc_lock_object(&shp->shm_perm); in do_shmat()
1161 if (!ipc_valid_object(&shp->shm_perm)) { in do_shmat()
1162 ipc_unlock_object(&shp->shm_perm); in do_shmat()
1171 ipc_unlock_object(&shp->shm_perm); in do_shmat()
1194 sfd->id = shp->shm_perm.id; in do_shmat()
1383 shp->shm_perm.key, in sysvipc_shm_proc_show()
1384 shp->shm_perm.id, in sysvipc_shm_proc_show()
1385 shp->shm_perm.mode, in sysvipc_shm_proc_show()
1390 from_kuid_munged(user_ns, shp->shm_perm.uid), in sysvipc_shm_proc_show()
1391 from_kgid_munged(user_ns, shp->shm_perm.gid), in sysvipc_shm_proc_show()
1392 from_kuid_munged(user_ns, shp->shm_perm.cuid), in sysvipc_shm_proc_show()
1393 from_kgid_munged(user_ns, shp->shm_perm.cgid), in sysvipc_shm_proc_show()