Lines Matching refs:shm_perm
54 struct kern_ipc_perm shm_perm;
98 ipc_unlock(&(shp)->shm_perm)
126 shp = container_of(ipcp, struct shmid_kernel, shm_perm);
130 shp->shm_perm.mode |= SHM_DEST;
132 ipc_set_key_private(&shm_ids(ns), &shp->shm_perm);
173 return container_of(ipcp, struct shmid_kernel, shm_perm);
183 return container_of(ipcp, struct shmid_kernel, shm_perm);
208 return container_of(ipcp, struct shmid_kernel, shm_perm);
225 ipc_lock_object(&ipcp->shm_perm);
233 shm_perm);
234 security_shm_free(&shp->shm_perm);
274 ipc_rmid(&shm_ids(s->ns), &s->shm_perm);
342 ipc_rcu_putref(&shp->shm_perm, shm_rcu_free);
359 (shp->shm_perm.mode & SHM_DEST));
412 struct shmid_kernel *shp = container_of(ipcp, struct shmid_kernel, shm_perm);
490 WARN_ON(!ipc_rcu_getref(&shp->shm_perm));
513 ipc_rcu_putref(&shp->shm_perm, shm_rcu_free);
515 if (ipc_valid_object(&shp->shm_perm)) {
731 shp->shm_perm.key = key;
732 shp->shm_perm.mode = (shmflg & S_IRWXUGO);
735 shp->shm_perm.security = NULL;
736 error = security_shm_alloc(&shp->shm_perm);
783 error = ipc_addid(&shm_ids(ns), &shp->shm_perm, ns->shm_ctlmni);
797 file_inode(file)->i_ino = shp->shm_perm.id;
800 error = shp->shm_perm.id;
802 ipc_unlock_object(&shp->shm_perm);
810 ipc_rcu_putref(&shp->shm_perm, shm_rcu_free);
813 call_rcu(&shp->shm_perm.rcu, shm_rcu_free);
824 shp = container_of(ipcp, struct shmid_kernel, shm_perm);
865 ipc64_perm_to_ipc_perm(&in->shm_perm, &out.shm_perm);
896 out->shm_perm.uid = tbuf_old.shm_perm.uid;
897 out->shm_perm.gid = tbuf_old.shm_perm.gid;
898 out->shm_perm.mode = tbuf_old.shm_perm.mode;
983 shp = container_of(ipc, struct shmid_kernel, shm_perm);
1007 &shmid64->shm_perm, 0);
1013 shp = container_of(ipcp, struct shmid_kernel, shm_perm);
1015 err = security_shm_shmctl(&shp->shm_perm, cmd);
1021 ipc_lock_object(&shp->shm_perm);
1026 ipc_lock_object(&shp->shm_perm);
1027 err = ipc_update_perm(&shmid64->shm_perm, ipcp);
1038 ipc_unlock_object(&shp->shm_perm);
1116 audit_ipc_obj(&shp->shm_perm);
1119 if (ipcperms(ns, &shp->shm_perm, S_IRUGO))
1123 err = security_shm_shmctl(&shp->shm_perm, cmd);
1127 ipc_lock_object(&shp->shm_perm);
1129 if (!ipc_valid_object(&shp->shm_perm)) {
1130 ipc_unlock_object(&shp->shm_perm);
1135 kernel_to_ipc64_perm(&shp->shm_perm, &tbuf->shm_perm);
1160 err = shp->shm_perm.id;
1163 ipc_unlock_object(&shp->shm_perm);
1182 audit_ipc_obj(&(shp->shm_perm));
1183 err = security_shm_shmctl(&shp->shm_perm, cmd);
1187 ipc_lock_object(&shp->shm_perm);
1190 if (!ipc_valid_object(&shp->shm_perm)) {
1198 if (!uid_eq(euid, shp->shm_perm.uid) &&
1199 !uid_eq(euid, shp->shm_perm.cuid)) {
1217 if (!err && !(shp->shm_perm.mode & SHM_LOCKED)) {
1218 shp->shm_perm.mode |= SHM_LOCKED;
1225 if (!(shp->shm_perm.mode & SHM_LOCKED))
1228 shp->shm_perm.mode &= ~SHM_LOCKED;
1231 ipc_unlock_object(&shp->shm_perm);
1239 ipc_unlock_object(&shp->shm_perm);
1321 struct compat_ipc_perm shm_perm;
1399 to_compat_ipc64_perm(&v.shm_perm, &in->shm_perm);
1414 to_compat_ipc_perm(&v.shm_perm, &in->shm_perm);
1415 v.shm_perm.key = in->shm_perm.key;
1433 return get_compat_ipc64_perm(&out->shm_perm, &p->shm_perm);
1436 return get_compat_ipc_perm(&out->shm_perm, &p->shm_perm);
1592 if (ipcperms(ns, &shp->shm_perm, acc_mode))
1595 err = security_shm_shmat(&shp->shm_perm, shmaddr, shmflg);
1599 ipc_lock_object(&shp->shm_perm);
1602 if (!ipc_valid_object(&shp->shm_perm)) {
1603 ipc_unlock_object(&shp->shm_perm);
1620 ipc_unlock_object(&shp->shm_perm);
1641 sfd->id = shp->shm_perm.id;
1851 shp = container_of(ipcp, struct shmid_kernel, shm_perm);
1864 shp->shm_perm.key,
1865 shp->shm_perm.id,
1866 shp->shm_perm.mode,
1871 from_kuid_munged(user_ns, shp->shm_perm.uid),
1872 from_kgid_munged(user_ns, shp->shm_perm.gid),
1873 from_kuid_munged(user_ns, shp->shm_perm.cuid),
1874 from_kgid_munged(user_ns, shp->shm_perm.cgid),