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);
398 struct kern_ipc_perm *ipcp = p;
399 struct shmid_kernel *shp = container_of(ipcp, struct shmid_kernel, shm_perm);
808 * Called with shm_ids.rwsem and ipcp locked.
810 static int shm_more_checks(struct kern_ipc_perm *ipcp, struct ipc_params *params)
814 shp = container_of(ipcp, struct shmid_kernel, shm_perm);
989 struct kern_ipc_perm *ipcp;
996 ipcp = ipcctl_obtain_check(ns, &shm_ids(ns), shmid, cmd,
998 if (IS_ERR(ipcp)) {
999 err = PTR_ERR(ipcp);
1003 shp = container_of(ipcp, struct shmid_kernel, shm_perm);
1013 do_shm_rmid(ns, ipcp);
1017 err = ipc_update_perm(&shmid64->shm_perm, ipcp);
1838 struct kern_ipc_perm *ipcp = it;
1842 shp = container_of(ipcp, struct shmid_kernel, shm_perm);