Lines Matching refs:ipcp
122 static void do_shm_rmid(struct ipc_namespace *ns, struct kern_ipc_perm *ipcp)
126 shp = container_of(ipcp, struct shmid_kernel, shm_perm);
168 struct kern_ipc_perm *ipcp = ipc_obtain_object_idr(&shm_ids(ns), id);
170 if (IS_ERR(ipcp))
171 return ERR_CAST(ipcp);
173 return container_of(ipcp, struct shmid_kernel, shm_perm);
178 struct kern_ipc_perm *ipcp = ipc_obtain_object_check(&shm_ids(ns), id);
180 if (IS_ERR(ipcp))
181 return ERR_CAST(ipcp);
183 return container_of(ipcp, struct shmid_kernel, shm_perm);
192 struct kern_ipc_perm *ipcp;
195 ipcp = ipc_obtain_object_idr(&shm_ids(ns), id);
196 if (IS_ERR(ipcp))
199 ipc_lock_object(ipcp);
206 if (ipc_valid_object(ipcp)) {
208 return container_of(ipcp, struct shmid_kernel, shm_perm);
211 ipc_unlock_object(ipcp);
212 ipcp = ERR_PTR(-EIDRM);
219 return ERR_CAST(ipcp);
222 static inline void shm_lock_by_ptr(struct shmid_kernel *ipcp)
225 ipc_lock_object(&ipcp->shm_perm);
411 struct kern_ipc_perm *ipcp = p;
412 struct shmid_kernel *shp = container_of(ipcp, struct shmid_kernel, shm_perm);
818 * Called with shm_ids.rwsem and ipcp locked.
820 static int shm_more_checks(struct kern_ipc_perm *ipcp, struct ipc_params *params)
824 shp = container_of(ipcp, struct shmid_kernel, shm_perm);
999 struct kern_ipc_perm *ipcp;
1006 ipcp = ipcctl_obtain_check(ns, &shm_ids(ns), shmid, cmd,
1008 if (IS_ERR(ipcp)) {
1009 err = PTR_ERR(ipcp);
1013 shp = container_of(ipcp, struct shmid_kernel, shm_perm);
1023 do_shm_rmid(ns, ipcp);
1027 err = ipc_update_perm(&shmid64->shm_perm, ipcp);
1847 struct kern_ipc_perm *ipcp = it;
1851 shp = container_of(ipcp, struct shmid_kernel, shm_perm);