Lines Matching refs:q_perm
50 struct kern_ipc_perm q_perm; member
109 return container_of(ipcp, struct msg_queue, q_perm); in msq_obtain_object()
120 return container_of(ipcp, struct msg_queue, q_perm); in msq_obtain_object_check()
125 ipc_rmid(&msg_ids(ns), &s->q_perm); in msg_rmid()
131 struct msg_queue *msq = container_of(p, struct msg_queue, q_perm); in msg_rcu_free()
133 security_msg_queue_free(&msq->q_perm); in msg_rcu_free()
155 msq->q_perm.mode = msgflg & S_IRWXUGO; in newque()
156 msq->q_perm.key = key; in newque()
158 msq->q_perm.security = NULL; in newque()
159 retval = security_msg_queue_alloc(&msq->q_perm); in newque()
175 retval = ipc_addid(&msg_ids(ns), &msq->q_perm, ns->msg_ctlmni); in newque()
177 ipc_rcu_putref(&msq->q_perm, msg_rcu_free); in newque()
181 ipc_unlock_object(&msq->q_perm); in newque()
184 return msq->q_perm.id; in newque()
275 __releases(&msq->q_perm) in freeque()
278 struct msg_queue *msq = container_of(ipcp, struct msg_queue, q_perm); in freeque()
284 ipc_unlock_object(&msq->q_perm); in freeque()
295 ipc_rcu_putref(&msq->q_perm, msg_rcu_free); in freeque()
418 msq = container_of(ipcp, struct msg_queue, q_perm); in msgctl_down()
420 err = security_msg_queue_msgctl(&msq->q_perm, cmd); in msgctl_down()
426 ipc_lock_object(&msq->q_perm); in msgctl_down()
440 ipc_lock_object(&msq->q_perm); in msgctl_down()
458 ipc_unlock_object(&msq->q_perm); in msgctl_down()
469 ipc_unlock_object(&msq->q_perm); in msgctl_down()
543 audit_ipc_obj(&msq->q_perm); in msgctl_stat()
546 if (ipcperms(ns, &msq->q_perm, S_IRUGO)) in msgctl_stat()
550 err = security_msg_queue_msgctl(&msq->q_perm, cmd); in msgctl_stat()
554 ipc_lock_object(&msq->q_perm); in msgctl_stat()
556 if (!ipc_valid_object(&msq->q_perm)) { in msgctl_stat()
557 ipc_unlock_object(&msq->q_perm); in msgctl_stat()
562 kernel_to_ipc64_perm(&msq->q_perm, &p->msg_perm); in msgctl_stat()
588 err = msq->q_perm.id; in msgctl_stat()
591 ipc_unlock_object(&msq->q_perm); in msgctl_stat()
823 !security_msg_queue_msgrcv(&msq->q_perm, msg, msr->r_tsk, in pipelined_send()
878 ipc_lock_object(&msq->q_perm); in do_msgsnd()
884 if (ipcperms(ns, &msq->q_perm, S_IWUGO)) in do_msgsnd()
888 if (!ipc_valid_object(&msq->q_perm)) { in do_msgsnd()
893 err = security_msg_queue_msgsnd(&msq->q_perm, msg, msgflg); in do_msgsnd()
909 if (!ipc_rcu_getref(&msq->q_perm)) { in do_msgsnd()
914 ipc_unlock_object(&msq->q_perm); in do_msgsnd()
919 ipc_lock_object(&msq->q_perm); in do_msgsnd()
921 ipc_rcu_putref(&msq->q_perm, msg_rcu_free); in do_msgsnd()
923 if (!ipc_valid_object(&msq->q_perm)) { in do_msgsnd()
952 ipc_unlock_object(&msq->q_perm); in do_msgsnd()
1081 !security_msg_queue_msgrcv(&msq->q_perm, msg, current, in find_msg()
1133 if (ipcperms(ns, &msq->q_perm, S_IRUGO)) in do_msgrcv()
1136 ipc_lock_object(&msq->q_perm); in do_msgrcv()
1139 if (!ipc_valid_object(&msq->q_perm)) { in do_msgrcv()
1196 ipc_unlock_object(&msq->q_perm); in do_msgrcv()
1233 ipc_lock_object(&msq->q_perm); in do_msgrcv()
1245 ipc_unlock_object(&msq->q_perm); in do_msgrcv()
1249 ipc_unlock_object(&msq->q_perm); in do_msgrcv()
1346 struct msg_queue *msq = container_of(ipcp, struct msg_queue, q_perm); in sysvipc_msg_proc_show()
1350 msq->q_perm.key, in sysvipc_msg_proc_show()
1351 msq->q_perm.id, in sysvipc_msg_proc_show()
1352 msq->q_perm.mode, in sysvipc_msg_proc_show()
1357 from_kuid_munged(user_ns, msq->q_perm.uid), in sysvipc_msg_proc_show()
1358 from_kgid_munged(user_ns, msq->q_perm.gid), in sysvipc_msg_proc_show()
1359 from_kuid_munged(user_ns, msq->q_perm.cuid), in sysvipc_msg_proc_show()
1360 from_kgid_munged(user_ns, msq->q_perm.cgid), in sysvipc_msg_proc_show()