Lines Matching refs:ipcp

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