Lines Matching defs:ipcp
124 static void do_shm_rmid(struct ipc_namespace *ns, struct kern_ipc_perm *ipcp)
128 shp = container_of(ipcp, struct shmid_kernel, shm_perm);
171 struct kern_ipc_perm *ipcp = ipc_obtain_object_idr(&shm_ids(ns), id);
173 if (IS_ERR(ipcp))
174 return ERR_CAST(ipcp);
176 return container_of(ipcp, struct shmid_kernel, shm_perm);
181 struct kern_ipc_perm *ipcp = ipc_obtain_object_check(&shm_ids(ns), id);
183 if (IS_ERR(ipcp))
184 return ERR_CAST(ipcp);
186 return container_of(ipcp, struct shmid_kernel, shm_perm);
195 struct kern_ipc_perm *ipcp;
198 ipcp = ipc_obtain_object_idr(&shm_ids(ns), id);
199 if (IS_ERR(ipcp))
202 ipc_lock_object(ipcp);
209 if (ipc_valid_object(ipcp)) {
211 return container_of(ipcp, struct shmid_kernel, shm_perm);
214 ipc_unlock_object(ipcp);
215 ipcp = ERR_PTR(-EIDRM);
222 return ERR_CAST(ipcp);
225 static inline void shm_lock_by_ptr(struct shmid_kernel *ipcp)
228 ipc_lock_object(&ipcp->shm_perm);
414 struct kern_ipc_perm *ipcp = p;
415 struct shmid_kernel *shp = container_of(ipcp, struct shmid_kernel, shm_perm);
817 * Called with shm_ids.rwsem and ipcp locked.
819 static int shm_more_checks(struct kern_ipc_perm *ipcp, struct ipc_params *params)
823 shp = container_of(ipcp, struct shmid_kernel, shm_perm);
998 struct kern_ipc_perm *ipcp;
1005 ipcp = ipcctl_obtain_check(ns, &shm_ids(ns), shmid, cmd,
1007 if (IS_ERR(ipcp)) {
1008 err = PTR_ERR(ipcp);
1012 shp = container_of(ipcp, struct shmid_kernel, shm_perm);
1022 do_shm_rmid(ns, ipcp);
1026 err = ipc_update_perm(&shmid64->shm_perm, ipcp);
1846 struct kern_ipc_perm *ipcp = it;
1850 shp = container_of(ipcp, struct shmid_kernel, shm_perm);