Lines Matching refs:sem_perm
115 struct kern_ipc_perm sem_perm; /* permissions .. see ipc.h */ member
326 struct sem_array *sma = container_of(p, struct sem_array, sem_perm); in sem_rcu_free()
328 security_sem_free(&sma->sem_perm); in sem_rcu_free()
397 ipc_lock_object(&sma->sem_perm); in sem_lock()
434 ipc_lock_object(&sma->sem_perm); in sem_lock()
448 ipc_unlock_object(&sma->sem_perm); in sem_lock()
465 ipc_unlock_object(&sma->sem_perm); in sem_unlock()
485 return container_of(ipcp, struct sem_array, sem_perm); in sem_obtain_object()
496 return container_of(ipcp, struct sem_array, sem_perm); in sem_obtain_object_check()
502 ipc_rcu_putref(&sma->sem_perm, sem_rcu_free); in sem_lock_and_putref()
507 ipc_rmid(&sem_ids(ns), &s->sem_perm); in sem_rmid()
549 sma->sem_perm.mode = (semflg & S_IRWXUGO); in newary()
550 sma->sem_perm.key = key; in newary()
552 sma->sem_perm.security = NULL; in newary()
553 retval = security_sem_alloc(&sma->sem_perm); in newary()
574 retval = ipc_addid(&sem_ids(ns), &sma->sem_perm, ns->sc_semmni); in newary()
576 ipc_rcu_putref(&sma->sem_perm, sem_rcu_free); in newary()
584 return sma->sem_perm.id; in newary()
595 sma = container_of(ipcp, struct sem_array, sem_perm); in sem_more_checks()
1148 struct sem_array *sma = container_of(ipcp, struct sem_array, sem_perm); in freeary()
1153 ipc_assert_locked_object(&sma->sem_perm); in freeary()
1193 ipc_rcu_putref(&sma->sem_perm, sem_rcu_free); in freeary()
1207 ipc64_perm_to_ipc_perm(&in->sem_perm, &out.sem_perm); in copy_semid_to_user()
1261 audit_ipc_obj(&sma->sem_perm); in semctl_stat()
1264 if (ipcperms(ns, &sma->sem_perm, S_IRUGO)) in semctl_stat()
1268 err = security_sem_semctl(&sma->sem_perm, cmd); in semctl_stat()
1272 ipc_lock_object(&sma->sem_perm); in semctl_stat()
1274 if (!ipc_valid_object(&sma->sem_perm)) { in semctl_stat()
1275 ipc_unlock_object(&sma->sem_perm); in semctl_stat()
1280 kernel_to_ipc64_perm(&sma->sem_perm, &semid64->sem_perm); in semctl_stat()
1301 err = sma->sem_perm.id; in semctl_stat()
1303 ipc_unlock_object(&sma->sem_perm); in semctl_stat()
1369 if (ipcperms(ns, &sma->sem_perm, S_IWUGO)) { in semctl_setval()
1374 err = security_sem_semctl(&sma->sem_perm, SETVAL); in semctl_setval()
1382 if (!ipc_valid_object(&sma->sem_perm)) { in semctl_setval()
1391 ipc_assert_locked_object(&sma->sem_perm); in semctl_setval()
1426 if (ipcperms(ns, &sma->sem_perm, cmd == SETALL ? S_IWUGO : S_IRUGO)) in semctl_main()
1429 err = security_sem_semctl(&sma->sem_perm, cmd); in semctl_main()
1441 if (!ipc_valid_object(&sma->sem_perm)) { in semctl_main()
1446 if (!ipc_rcu_getref(&sma->sem_perm)) { in semctl_main()
1455 ipc_rcu_putref(&sma->sem_perm, sem_rcu_free); in semctl_main()
1461 if (!ipc_valid_object(&sma->sem_perm)) { in semctl_main()
1480 if (!ipc_rcu_getref(&sma->sem_perm)) { in semctl_main()
1490 ipc_rcu_putref(&sma->sem_perm, sem_rcu_free); in semctl_main()
1496 ipc_rcu_putref(&sma->sem_perm, sem_rcu_free); in semctl_main()
1503 ipc_rcu_putref(&sma->sem_perm, sem_rcu_free); in semctl_main()
1510 if (!ipc_valid_object(&sma->sem_perm)) { in semctl_main()
1520 ipc_assert_locked_object(&sma->sem_perm); in semctl_main()
1538 if (!ipc_valid_object(&sma->sem_perm)) { in semctl_main()
1587 out->sem_perm.uid = tbuf_old.sem_perm.uid; in copy_semid_from_user()
1588 out->sem_perm.gid = tbuf_old.sem_perm.gid; in copy_semid_from_user()
1589 out->sem_perm.mode = tbuf_old.sem_perm.mode; in copy_semid_from_user()
1614 &semid64->sem_perm, 0); in semctl_down()
1620 sma = container_of(ipcp, struct sem_array, sem_perm); in semctl_down()
1622 err = security_sem_semctl(&sma->sem_perm, cmd); in semctl_down()
1634 err = ipc_update_perm(&semid64->sem_perm, ipcp); in semctl_down()
1729 struct compat_ipc_perm sem_perm; member
1745 return get_compat_ipc64_perm(&out->sem_perm, &p->sem_perm); in copy_compat_semid_from_user()
1748 return get_compat_ipc_perm(&out->sem_perm, &p->sem_perm); in copy_compat_semid_from_user()
1758 to_compat_ipc64_perm(&v.sem_perm, &in->sem_perm); in copy_compat_semid_to_user()
1768 to_compat_ipc_perm(&v.sem_perm, &in->sem_perm); in copy_compat_semid_to_user()
1935 if (!ipc_rcu_getref(&sma->sem_perm)) { in find_alloc_undo()
1946 ipc_rcu_putref(&sma->sem_perm, sem_rcu_free); in find_alloc_undo()
1953 if (!ipc_valid_object(&sma->sem_perm)) { in find_alloc_undo()
1977 ipc_assert_locked_object(&sma->sem_perm); in find_alloc_undo()
2064 if (ipcperms(ns, &sma->sem_perm, alter ? S_IWUGO : S_IRUGO)) { in __do_semtimedop()
2069 error = security_sem_semop(&sma->sem_perm, sops, nsops, alter); in __do_semtimedop()
2085 if (!ipc_valid_object(&sma->sem_perm)) in __do_semtimedop()
2196 if (!ipc_valid_object(&sma->sem_perm)) in __do_semtimedop()
2394 if (!ipc_valid_object(&sma->sem_perm)) { in exit_sem()
2410 ipc_assert_locked_object(&sma->sem_perm); in exit_sem()
2458 struct sem_array *sma = container_of(ipcp, struct sem_array, sem_perm); in sysvipc_sem_proc_show()
2474 sma->sem_perm.key, in sysvipc_sem_proc_show()
2475 sma->sem_perm.id, in sysvipc_sem_proc_show()
2476 sma->sem_perm.mode, in sysvipc_sem_proc_show()
2478 from_kuid_munged(user_ns, sma->sem_perm.uid), in sysvipc_sem_proc_show()
2479 from_kgid_munged(user_ns, sma->sem_perm.gid), in sysvipc_sem_proc_show()
2480 from_kuid_munged(user_ns, sma->sem_perm.cuid), in sysvipc_sem_proc_show()
2481 from_kgid_munged(user_ns, sma->sem_perm.cgid), in sysvipc_sem_proc_show()