Lines Matching defs:ipcp
112 static void do_shm_rmid(struct ipc_namespace *ns, struct kern_ipc_perm *ipcp)
116 shp = container_of(ipcp, struct shmid_kernel, shm_perm);
161 struct kern_ipc_perm *ipcp = ipc_obtain_object_idr(&shm_ids(ns), id);
163 if (IS_ERR(ipcp)) {
164 return ERR_CAST(ipcp);
167 return container_of(ipcp, struct shmid_kernel, shm_perm);
172 struct kern_ipc_perm *ipcp = ipc_obtain_object_check(&shm_ids(ns), id);
174 if (IS_ERR(ipcp)) {
175 return ERR_CAST(ipcp);
178 return container_of(ipcp, struct shmid_kernel, shm_perm);
187 struct kern_ipc_perm *ipcp;
190 ipcp = ipc_obtain_object_idr(&shm_ids(ns), id);
191 if (IS_ERR(ipcp)) {
195 ipc_lock_object(ipcp);
202 if (ipc_valid_object(ipcp)) {
204 return container_of(ipcp, struct shmid_kernel, shm_perm);
207 ipc_unlock_object(ipcp);
208 ipcp = ERR_PTR(-EIDRM);
215 return ERR_CAST(ipcp);
218 static inline void shm_lock_by_ptr(struct shmid_kernel *ipcp)
221 ipc_lock_object(&ipcp->shm_perm);
392 struct kern_ipc_perm *ipcp = p;
393 struct shmid_kernel *shp = container_of(ipcp, struct shmid_kernel, shm_perm);
812 * Called with shm_ids.rwsem and ipcp locked.
814 static int shm_more_checks(struct kern_ipc_perm *ipcp, struct ipc_params *params)
818 shp = container_of(ipcp, struct shmid_kernel, shm_perm);
991 struct kern_ipc_perm *ipcp;
998 ipcp = ipcctl_obtain_check(ns, &shm_ids(ns), shmid, cmd, &shmid64->shm_perm, 0);
999 if (IS_ERR(ipcp)) {
1000 err = PTR_ERR(ipcp);
1004 shp = container_of(ipcp, struct shmid_kernel, shm_perm);
1015 do_shm_rmid(ns, ipcp);
1019 err = ipc_update_perm(&shmid64->shm_perm, ipcp);
1865 struct kern_ipc_perm *ipcp = it;
1869 shp = container_of(ipcp, struct shmid_kernel, shm_perm);