sma              7182 drivers/infiniband/hw/hfi1/chip.c 	if (was_up && ppd->local_link_down_reason.sma == 0 &&
sma              7183 drivers/infiniband/hw/hfi1/chip.c 	    ppd->neigh_link_down_reason.sma == 0) {
sma              7184 drivers/infiniband/hw/hfi1/chip.c 		ppd->local_link_down_reason.sma =
sma              7186 drivers/infiniband/hw/hfi1/chip.c 		ppd->neigh_link_down_reason.sma =
sma               747 drivers/infiniband/hw/hfi1/hfi.h 	u8 sma;
sma               951 drivers/infiniband/hw/hfi1/mad.c 	pi->link_down_reason = ppd->local_link_down_reason.sma;
sma               952 drivers/infiniband/hw/hfi1/mad.c 	pi->neigh_link_down_reason = ppd->neigh_link_down_reason.sma;
sma              1472 drivers/infiniband/hw/hfi1/mad.c 		ppd->local_link_down_reason.sma = 0;
sma              1477 drivers/infiniband/hw/hfi1/mad.c 		ppd->neigh_link_down_reason.sma = 0;
sma               744 drivers/net/ethernet/amd/xgbe/xgbe-drv.c 	hw_feat->sma         = XGMAC_GET_BITS(mac_hfr0, MAC_HWF0R, SMASEL);
sma               837 drivers/net/ethernet/amd/xgbe/xgbe-drv.c 			hw_feat->sma ? "yes" : "no");
sma               966 drivers/net/ethernet/amd/xgbe/xgbe.h 	unsigned int sma;		/* SMA(MDIO) Interface */
sma               204 drivers/net/ethernet/chelsio/cxgb4/t4fw_api.h 	__u8   sma[6];
sma               236 drivers/net/ethernet/chelsio/cxgb4/t4fw_api.h 	__u8   sma[6];
sma               379 drivers/net/ethernet/synopsys/dwc-xlgmac-common.c 	hw_feat->sma         = XLGMAC_GET_REG_BITS(mac_hfr0,
sma               527 drivers/net/ethernet/synopsys/dwc-xlgmac-common.c 		  pdata->hw_feat.sma ? "YES" : "NO");
sma               501 drivers/net/ethernet/synopsys/dwc-xlgmac.h 	unsigned int sma;		/* SMA(MDIO) Interface */
sma               427 include/linux/security.h int security_sem_alloc(struct kern_ipc_perm *sma);
sma               428 include/linux/security.h void security_sem_free(struct kern_ipc_perm *sma);
sma               429 include/linux/security.h int security_sem_associate(struct kern_ipc_perm *sma, int semflg);
sma               430 include/linux/security.h int security_sem_semctl(struct kern_ipc_perm *sma, int cmd);
sma               431 include/linux/security.h int security_sem_semop(struct kern_ipc_perm *sma, struct sembuf *sops,
sma              1188 include/linux/security.h static inline int security_sem_alloc(struct kern_ipc_perm *sma)
sma              1193 include/linux/security.h static inline void security_sem_free(struct kern_ipc_perm *sma)
sma              1196 include/linux/security.h static inline int security_sem_associate(struct kern_ipc_perm *sma, int semflg)
sma              1201 include/linux/security.h static inline int security_sem_semctl(struct kern_ipc_perm *sma, int cmd)
sma              1206 include/linux/security.h static inline int security_sem_semop(struct kern_ipc_perm *sma,
sma               258 ipc/sem.c      static void unmerge_queues(struct sem_array *sma)
sma               263 ipc/sem.c      	if (sma->complex_count)
sma               270 ipc/sem.c      	list_for_each_entry_safe(q, tq, &sma->pending_alter, list) {
sma               272 ipc/sem.c      		curr = &sma->sems[q->sops[0].sem_num];
sma               276 ipc/sem.c      	INIT_LIST_HEAD(&sma->pending_alter);
sma               288 ipc/sem.c      static void merge_queues(struct sem_array *sma)
sma               291 ipc/sem.c      	for (i = 0; i < sma->sem_nsems; i++) {
sma               292 ipc/sem.c      		struct sem *sem = &sma->sems[i];
sma               294 ipc/sem.c      		list_splice_init(&sem->pending_alter, &sma->pending_alter);
sma               301 ipc/sem.c      	struct sem_array *sma = container_of(p, struct sem_array, sem_perm);
sma               303 ipc/sem.c      	security_sem_free(&sma->sem_perm);
sma               304 ipc/sem.c      	kvfree(sma);
sma               311 ipc/sem.c      static void complexmode_enter(struct sem_array *sma)
sma               316 ipc/sem.c      	if (sma->use_global_lock > 0)  {
sma               322 ipc/sem.c      		sma->use_global_lock = USE_GLOBAL_LOCK_HYSTERESIS;
sma               325 ipc/sem.c      	sma->use_global_lock = USE_GLOBAL_LOCK_HYSTERESIS;
sma               327 ipc/sem.c      	for (i = 0; i < sma->sem_nsems; i++) {
sma               328 ipc/sem.c      		sem = &sma->sems[i];
sma               338 ipc/sem.c      static void complexmode_tryleave(struct sem_array *sma)
sma               340 ipc/sem.c      	if (sma->complex_count)  {
sma               346 ipc/sem.c      	if (sma->use_global_lock == 1) {
sma               353 ipc/sem.c      		smp_store_release(&sma->use_global_lock, 0);
sma               355 ipc/sem.c      		sma->use_global_lock--;
sma               367 ipc/sem.c      static inline int sem_lock(struct sem_array *sma, struct sembuf *sops,
sma               375 ipc/sem.c      		ipc_lock_object(&sma->sem_perm);
sma               378 ipc/sem.c      		complexmode_enter(sma);
sma               389 ipc/sem.c      	idx = array_index_nospec(sops->sem_num, sma->sem_nsems);
sma               390 ipc/sem.c      	sem = &sma->sems[idx];
sma               396 ipc/sem.c      	if (!sma->use_global_lock) {
sma               404 ipc/sem.c      		if (!smp_load_acquire(&sma->use_global_lock)) {
sma               412 ipc/sem.c      	ipc_lock_object(&sma->sem_perm);
sma               414 ipc/sem.c      	if (sma->use_global_lock == 0) {
sma               426 ipc/sem.c      		ipc_unlock_object(&sma->sem_perm);
sma               438 ipc/sem.c      static inline void sem_unlock(struct sem_array *sma, int locknum)
sma               441 ipc/sem.c      		unmerge_queues(sma);
sma               442 ipc/sem.c      		complexmode_tryleave(sma);
sma               443 ipc/sem.c      		ipc_unlock_object(&sma->sem_perm);
sma               445 ipc/sem.c      		struct sem *sem = &sma->sems[locknum];
sma               477 ipc/sem.c      static inline void sem_lock_and_putref(struct sem_array *sma)
sma               479 ipc/sem.c      	sem_lock(sma, NULL, -1);
sma               480 ipc/sem.c      	ipc_rcu_putref(&sma->sem_perm, sem_rcu_free);
sma               490 ipc/sem.c      	struct sem_array *sma;
sma               492 ipc/sem.c      	if (nsems > (INT_MAX - sizeof(*sma)) / sizeof(sma->sems[0]))
sma               495 ipc/sem.c      	sma = kvzalloc(struct_size(sma, sems, nsems), GFP_KERNEL);
sma               496 ipc/sem.c      	if (unlikely(!sma))
sma               499 ipc/sem.c      	return sma;
sma               512 ipc/sem.c      	struct sem_array *sma;
sma               523 ipc/sem.c      	sma = sem_alloc(nsems);
sma               524 ipc/sem.c      	if (!sma)
sma               527 ipc/sem.c      	sma->sem_perm.mode = (semflg & S_IRWXUGO);
sma               528 ipc/sem.c      	sma->sem_perm.key = key;
sma               530 ipc/sem.c      	sma->sem_perm.security = NULL;
sma               531 ipc/sem.c      	retval = security_sem_alloc(&sma->sem_perm);
sma               533 ipc/sem.c      		kvfree(sma);
sma               538 ipc/sem.c      		INIT_LIST_HEAD(&sma->sems[i].pending_alter);
sma               539 ipc/sem.c      		INIT_LIST_HEAD(&sma->sems[i].pending_const);
sma               540 ipc/sem.c      		spin_lock_init(&sma->sems[i].lock);
sma               543 ipc/sem.c      	sma->complex_count = 0;
sma               544 ipc/sem.c      	sma->use_global_lock = USE_GLOBAL_LOCK_HYSTERESIS;
sma               545 ipc/sem.c      	INIT_LIST_HEAD(&sma->pending_alter);
sma               546 ipc/sem.c      	INIT_LIST_HEAD(&sma->pending_const);
sma               547 ipc/sem.c      	INIT_LIST_HEAD(&sma->list_id);
sma               548 ipc/sem.c      	sma->sem_nsems = nsems;
sma               549 ipc/sem.c      	sma->sem_ctime = ktime_get_real_seconds();
sma               552 ipc/sem.c      	retval = ipc_addid(&sem_ids(ns), &sma->sem_perm, ns->sc_semmni);
sma               554 ipc/sem.c      		ipc_rcu_putref(&sma->sem_perm, sem_rcu_free);
sma               559 ipc/sem.c      	sem_unlock(sma, -1);
sma               562 ipc/sem.c      	return sma->sem_perm.id;
sma               572 ipc/sem.c      	struct sem_array *sma;
sma               574 ipc/sem.c      	sma = container_of(ipcp, struct sem_array, sem_perm);
sma               575 ipc/sem.c      	if (params->u.nsems > sma->sem_nsems)
sma               625 ipc/sem.c      static int perform_atomic_semop_slow(struct sem_array *sma, struct sem_queue *q)
sma               639 ipc/sem.c      		int idx = array_index_nospec(sop->sem_num, sma->sem_nsems);
sma               640 ipc/sem.c      		curr = &sma->sems[idx];
sma               667 ipc/sem.c      		ipc_update_pid(&sma->sems[sop->sem_num].sempid, pid);
sma               689 ipc/sem.c      		sma->sems[sop->sem_num].semval -= sem_op;
sma               698 ipc/sem.c      static int perform_atomic_semop(struct sem_array *sma, struct sem_queue *q)
sma               711 ipc/sem.c      		return perform_atomic_semop_slow(sma, q);
sma               720 ipc/sem.c      		int idx = array_index_nospec(sop->sem_num, sma->sem_nsems);
sma               722 ipc/sem.c      		curr = &sma->sems[idx];
sma               746 ipc/sem.c      		curr = &sma->sems[sop->sem_num];
sma               780 ipc/sem.c      static void unlink_queue(struct sem_array *sma, struct sem_queue *q)
sma               784 ipc/sem.c      		sma->complex_count--;
sma               797 ipc/sem.c      static inline int check_restart(struct sem_array *sma, struct sem_queue *q)
sma               800 ipc/sem.c      	if (!list_empty(&sma->pending_alter))
sma               835 ipc/sem.c      static int wake_const_ops(struct sem_array *sma, int semnum,
sma               843 ipc/sem.c      		pending_list = &sma->pending_const;
sma               845 ipc/sem.c      		pending_list = &sma->sems[semnum].pending_const;
sma               848 ipc/sem.c      		int error = perform_atomic_semop(sma, q);
sma               853 ipc/sem.c      		unlink_queue(sma, q);
sma               874 ipc/sem.c      static int do_smart_wakeup_zero(struct sem_array *sma, struct sembuf *sops,
sma               886 ipc/sem.c      			if (sma->sems[num].semval == 0) {
sma               888 ipc/sem.c      				semop_completed |= wake_const_ops(sma, num, wake_q);
sma               896 ipc/sem.c      		for (i = 0; i < sma->sem_nsems; i++) {
sma               897 ipc/sem.c      			if (sma->sems[i].semval == 0) {
sma               899 ipc/sem.c      				semop_completed |= wake_const_ops(sma, i, wake_q);
sma               908 ipc/sem.c      		semop_completed |= wake_const_ops(sma, -1, wake_q);
sma               930 ipc/sem.c      static int update_queue(struct sem_array *sma, int semnum, struct wake_q_head *wake_q)
sma               937 ipc/sem.c      		pending_list = &sma->pending_alter;
sma               939 ipc/sem.c      		pending_list = &sma->sems[semnum].pending_alter;
sma               952 ipc/sem.c      		if (semnum != -1 && sma->sems[semnum].semval == 0)
sma               955 ipc/sem.c      		error = perform_atomic_semop(sma, q);
sma               961 ipc/sem.c      		unlink_queue(sma, q);
sma               967 ipc/sem.c      			do_smart_wakeup_zero(sma, q->sops, q->nsops, wake_q);
sma               968 ipc/sem.c      			restart = check_restart(sma, q);
sma               986 ipc/sem.c      static void set_semotime(struct sem_array *sma, struct sembuf *sops)
sma               989 ipc/sem.c      		sma->sems[0].sem_otime = ktime_get_real_seconds();
sma               991 ipc/sem.c      		sma->sems[sops[0].sem_num].sem_otime =
sma              1010 ipc/sem.c      static void do_smart_update(struct sem_array *sma, struct sembuf *sops, int nsops,
sma              1015 ipc/sem.c      	otime |= do_smart_wakeup_zero(sma, sops, nsops, wake_q);
sma              1017 ipc/sem.c      	if (!list_empty(&sma->pending_alter)) {
sma              1019 ipc/sem.c      		otime |= update_queue(sma, -1, wake_q);
sma              1026 ipc/sem.c      			for (i = 0; i < sma->sem_nsems; i++)
sma              1027 ipc/sem.c      				otime |= update_queue(sma, i, wake_q);
sma              1040 ipc/sem.c      					otime |= update_queue(sma,
sma              1047 ipc/sem.c      		set_semotime(sma, sops);
sma              1053 ipc/sem.c      static int check_qop(struct sem_array *sma, int semnum, struct sem_queue *q,
sma              1087 ipc/sem.c      static int count_semcnt(struct sem_array *sma, ushort semnum,
sma              1097 ipc/sem.c      		l = &sma->sems[semnum].pending_const;
sma              1099 ipc/sem.c      		l = &sma->sems[semnum].pending_alter;
sma              1109 ipc/sem.c      	list_for_each_entry(q, &sma->pending_alter, list) {
sma              1110 ipc/sem.c      		semcnt += check_qop(sma, semnum, q, count_zero);
sma              1113 ipc/sem.c      		list_for_each_entry(q, &sma->pending_const, list) {
sma              1114 ipc/sem.c      			semcnt += check_qop(sma, semnum, q, count_zero);
sma              1128 ipc/sem.c      	struct sem_array *sma = container_of(ipcp, struct sem_array, sem_perm);
sma              1133 ipc/sem.c      	ipc_assert_locked_object(&sma->sem_perm);
sma              1134 ipc/sem.c      	list_for_each_entry_safe(un, tu, &sma->list_id, list_id) {
sma              1144 ipc/sem.c      	list_for_each_entry_safe(q, tq, &sma->pending_const, list) {
sma              1145 ipc/sem.c      		unlink_queue(sma, q);
sma              1149 ipc/sem.c      	list_for_each_entry_safe(q, tq, &sma->pending_alter, list) {
sma              1150 ipc/sem.c      		unlink_queue(sma, q);
sma              1153 ipc/sem.c      	for (i = 0; i < sma->sem_nsems; i++) {
sma              1154 ipc/sem.c      		struct sem *sem = &sma->sems[i];
sma              1156 ipc/sem.c      			unlink_queue(sma, q);
sma              1160 ipc/sem.c      			unlink_queue(sma, q);
sma              1167 ipc/sem.c      	sem_rmid(ns, sma);
sma              1168 ipc/sem.c      	sem_unlock(sma, -1);
sma              1172 ipc/sem.c      	ns->used_sems -= sma->sem_nsems;
sma              1173 ipc/sem.c      	ipc_rcu_putref(&sma->sem_perm, sem_rcu_free);
sma              1200 ipc/sem.c      static time64_t get_semotime(struct sem_array *sma)
sma              1205 ipc/sem.c      	res = sma->sems[0].sem_otime;
sma              1206 ipc/sem.c      	for (i = 1; i < sma->sem_nsems; i++) {
sma              1207 ipc/sem.c      		time64_t to = sma->sems[i].sem_otime;
sma              1218 ipc/sem.c      	struct sem_array *sma;
sma              1226 ipc/sem.c      		sma = sem_obtain_object(ns, semid);
sma              1227 ipc/sem.c      		if (IS_ERR(sma)) {
sma              1228 ipc/sem.c      			err = PTR_ERR(sma);
sma              1232 ipc/sem.c      		sma = sem_obtain_object_check(ns, semid);
sma              1233 ipc/sem.c      		if (IS_ERR(sma)) {
sma              1234 ipc/sem.c      			err = PTR_ERR(sma);
sma              1241 ipc/sem.c      		audit_ipc_obj(&sma->sem_perm);
sma              1244 ipc/sem.c      		if (ipcperms(ns, &sma->sem_perm, S_IRUGO))
sma              1248 ipc/sem.c      	err = security_sem_semctl(&sma->sem_perm, cmd);
sma              1252 ipc/sem.c      	ipc_lock_object(&sma->sem_perm);
sma              1254 ipc/sem.c      	if (!ipc_valid_object(&sma->sem_perm)) {
sma              1255 ipc/sem.c      		ipc_unlock_object(&sma->sem_perm);
sma              1260 ipc/sem.c      	kernel_to_ipc64_perm(&sma->sem_perm, &semid64->sem_perm);
sma              1261 ipc/sem.c      	semotime = get_semotime(sma);
sma              1263 ipc/sem.c      	semid64->sem_ctime = sma->sem_ctime;
sma              1266 ipc/sem.c      	semid64->sem_ctime_high = sma->sem_ctime >> 32;
sma              1268 ipc/sem.c      	semid64->sem_nsems = sma->sem_nsems;
sma              1281 ipc/sem.c      		err = sma->sem_perm.id;
sma              1283 ipc/sem.c      	ipc_unlock_object(&sma->sem_perm);
sma              1328 ipc/sem.c      	struct sem_array *sma;
sma              1337 ipc/sem.c      	sma = sem_obtain_object_check(ns, semid);
sma              1338 ipc/sem.c      	if (IS_ERR(sma)) {
sma              1340 ipc/sem.c      		return PTR_ERR(sma);
sma              1343 ipc/sem.c      	if (semnum < 0 || semnum >= sma->sem_nsems) {
sma              1349 ipc/sem.c      	if (ipcperms(ns, &sma->sem_perm, S_IWUGO)) {
sma              1354 ipc/sem.c      	err = security_sem_semctl(&sma->sem_perm, SETVAL);
sma              1360 ipc/sem.c      	sem_lock(sma, NULL, -1);
sma              1362 ipc/sem.c      	if (!ipc_valid_object(&sma->sem_perm)) {
sma              1363 ipc/sem.c      		sem_unlock(sma, -1);
sma              1368 ipc/sem.c      	semnum = array_index_nospec(semnum, sma->sem_nsems);
sma              1369 ipc/sem.c      	curr = &sma->sems[semnum];
sma              1371 ipc/sem.c      	ipc_assert_locked_object(&sma->sem_perm);
sma              1372 ipc/sem.c      	list_for_each_entry(un, &sma->list_id, list_id)
sma              1377 ipc/sem.c      	sma->sem_ctime = ktime_get_real_seconds();
sma              1379 ipc/sem.c      	do_smart_update(sma, NULL, 0, 0, &wake_q);
sma              1380 ipc/sem.c      	sem_unlock(sma, -1);
sma              1389 ipc/sem.c      	struct sem_array *sma;
sma              1397 ipc/sem.c      	sma = sem_obtain_object_check(ns, semid);
sma              1398 ipc/sem.c      	if (IS_ERR(sma)) {
sma              1400 ipc/sem.c      		return PTR_ERR(sma);
sma              1403 ipc/sem.c      	nsems = sma->sem_nsems;
sma              1406 ipc/sem.c      	if (ipcperms(ns, &sma->sem_perm, cmd == SETALL ? S_IWUGO : S_IRUGO))
sma              1409 ipc/sem.c      	err = security_sem_semctl(&sma->sem_perm, cmd);
sma              1420 ipc/sem.c      		sem_lock(sma, NULL, -1);
sma              1421 ipc/sem.c      		if (!ipc_valid_object(&sma->sem_perm)) {
sma              1426 ipc/sem.c      			if (!ipc_rcu_getref(&sma->sem_perm)) {
sma              1430 ipc/sem.c      			sem_unlock(sma, -1);
sma              1435 ipc/sem.c      				ipc_rcu_putref(&sma->sem_perm, sem_rcu_free);
sma              1440 ipc/sem.c      			sem_lock_and_putref(sma);
sma              1441 ipc/sem.c      			if (!ipc_valid_object(&sma->sem_perm)) {
sma              1446 ipc/sem.c      		for (i = 0; i < sma->sem_nsems; i++)
sma              1447 ipc/sem.c      			sem_io[i] = sma->sems[i].semval;
sma              1448 ipc/sem.c      		sem_unlock(sma, -1);
sma              1460 ipc/sem.c      		if (!ipc_rcu_getref(&sma->sem_perm)) {
sma              1470 ipc/sem.c      				ipc_rcu_putref(&sma->sem_perm, sem_rcu_free);
sma              1476 ipc/sem.c      			ipc_rcu_putref(&sma->sem_perm, sem_rcu_free);
sma              1483 ipc/sem.c      				ipc_rcu_putref(&sma->sem_perm, sem_rcu_free);
sma              1489 ipc/sem.c      		sem_lock_and_putref(sma);
sma              1490 ipc/sem.c      		if (!ipc_valid_object(&sma->sem_perm)) {
sma              1496 ipc/sem.c      			sma->sems[i].semval = sem_io[i];
sma              1497 ipc/sem.c      			ipc_update_pid(&sma->sems[i].sempid, task_tgid(current));
sma              1500 ipc/sem.c      		ipc_assert_locked_object(&sma->sem_perm);
sma              1501 ipc/sem.c      		list_for_each_entry(un, &sma->list_id, list_id) {
sma              1505 ipc/sem.c      		sma->sem_ctime = ktime_get_real_seconds();
sma              1507 ipc/sem.c      		do_smart_update(sma, NULL, 0, 0, &wake_q);
sma              1517 ipc/sem.c      	sem_lock(sma, NULL, -1);
sma              1518 ipc/sem.c      	if (!ipc_valid_object(&sma->sem_perm)) {
sma              1524 ipc/sem.c      	curr = &sma->sems[semnum];
sma              1534 ipc/sem.c      		err = count_semcnt(sma, semnum, 0);
sma              1537 ipc/sem.c      		err = count_semcnt(sma, semnum, 1);
sma              1542 ipc/sem.c      	sem_unlock(sma, -1);
sma              1586 ipc/sem.c      	struct sem_array *sma;
sma              1600 ipc/sem.c      	sma = container_of(ipcp, struct sem_array, sem_perm);
sma              1602 ipc/sem.c      	err = security_sem_semctl(&sma->sem_perm, cmd);
sma              1608 ipc/sem.c      		sem_lock(sma, NULL, -1);
sma              1613 ipc/sem.c      		sem_lock(sma, NULL, -1);
sma              1617 ipc/sem.c      		sma->sem_ctime = ktime_get_real_seconds();
sma              1625 ipc/sem.c      	sem_unlock(sma, -1);
sma              1890 ipc/sem.c      	struct sem_array *sma;
sma              1908 ipc/sem.c      	sma = sem_obtain_object_check(ns, semid);
sma              1909 ipc/sem.c      	if (IS_ERR(sma)) {
sma              1911 ipc/sem.c      		return ERR_CAST(sma);
sma              1914 ipc/sem.c      	nsems = sma->sem_nsems;
sma              1915 ipc/sem.c      	if (!ipc_rcu_getref(&sma->sem_perm)) {
sma              1925 ipc/sem.c      		ipc_rcu_putref(&sma->sem_perm, sem_rcu_free);
sma              1931 ipc/sem.c      	sem_lock_and_putref(sma);
sma              1932 ipc/sem.c      	if (!ipc_valid_object(&sma->sem_perm)) {
sma              1933 ipc/sem.c      		sem_unlock(sma, -1);
sma              1955 ipc/sem.c      	ipc_assert_locked_object(&sma->sem_perm);
sma              1956 ipc/sem.c      	list_add(&new->list_id, &sma->list_id);
sma              1961 ipc/sem.c      	sem_unlock(sma, -1);
sma              1970 ipc/sem.c      	struct sem_array *sma;
sma              2041 ipc/sem.c      	sma = sem_obtain_object_check(ns, semid);
sma              2042 ipc/sem.c      	if (IS_ERR(sma)) {
sma              2044 ipc/sem.c      		error = PTR_ERR(sma);
sma              2049 ipc/sem.c      	if (max >= sma->sem_nsems) {
sma              2055 ipc/sem.c      	if (ipcperms(ns, &sma->sem_perm, alter ? S_IWUGO : S_IRUGO)) {
sma              2060 ipc/sem.c      	error = security_sem_semop(&sma->sem_perm, sops, nsops, alter);
sma              2067 ipc/sem.c      	locknum = sem_lock(sma, sops, nsops);
sma              2076 ipc/sem.c      	if (!ipc_valid_object(&sma->sem_perm))
sma              2095 ipc/sem.c      	error = perform_atomic_semop(sma, &queue);
sma              2104 ipc/sem.c      			do_smart_update(sma, sops, nsops, 1, &wake_q);
sma              2106 ipc/sem.c      			set_semotime(sma, sops);
sma              2108 ipc/sem.c      		sem_unlock(sma, locknum);
sma              2123 ipc/sem.c      		int idx = array_index_nospec(sops->sem_num, sma->sem_nsems);
sma              2124 ipc/sem.c      		curr = &sma->sems[idx];
sma              2127 ipc/sem.c      			if (sma->complex_count) {
sma              2129 ipc/sem.c      						&sma->pending_alter);
sma              2139 ipc/sem.c      		if (!sma->complex_count)
sma              2140 ipc/sem.c      			merge_queues(sma);
sma              2143 ipc/sem.c      			list_add_tail(&queue.list, &sma->pending_alter);
sma              2145 ipc/sem.c      			list_add_tail(&queue.list, &sma->pending_const);
sma              2147 ipc/sem.c      		sma->complex_count++;
sma              2155 ipc/sem.c      		sem_unlock(sma, locknum);
sma              2187 ipc/sem.c      		locknum = sem_lock(sma, sops, nsops);
sma              2189 ipc/sem.c      		if (!ipc_valid_object(&sma->sem_perm))
sma              2208 ipc/sem.c      	unlink_queue(sma, &queue);
sma              2211 ipc/sem.c      	sem_unlock(sma, locknum);
sma              2311 ipc/sem.c      		struct sem_array *sma;
sma              2343 ipc/sem.c      		sma = sem_obtain_object_check(tsk->nsproxy->ipc_ns, semid);
sma              2345 ipc/sem.c      		if (IS_ERR(sma)) {
sma              2350 ipc/sem.c      		sem_lock(sma, NULL, -1);
sma              2352 ipc/sem.c      		if (!ipc_valid_object(&sma->sem_perm)) {
sma              2353 ipc/sem.c      			sem_unlock(sma, -1);
sma              2362 ipc/sem.c      			sem_unlock(sma, -1);
sma              2368 ipc/sem.c      		ipc_assert_locked_object(&sma->sem_perm);
sma              2376 ipc/sem.c      		for (i = 0; i < sma->sem_nsems; i++) {
sma              2377 ipc/sem.c      			struct sem *semaphore = &sma->sems[i];
sma              2401 ipc/sem.c      		do_smart_update(sma, NULL, 0, 1, &wake_q);
sma              2402 ipc/sem.c      		sem_unlock(sma, -1);
sma              2416 ipc/sem.c      	struct sem_array *sma = container_of(ipcp, struct sem_array, sem_perm);
sma              2425 ipc/sem.c      	complexmode_enter(sma);
sma              2427 ipc/sem.c      	sem_otime = get_semotime(sma);
sma              2431 ipc/sem.c      		   sma->sem_perm.key,
sma              2432 ipc/sem.c      		   sma->sem_perm.id,
sma              2433 ipc/sem.c      		   sma->sem_perm.mode,
sma              2434 ipc/sem.c      		   sma->sem_nsems,
sma              2435 ipc/sem.c      		   from_kuid_munged(user_ns, sma->sem_perm.uid),
sma              2436 ipc/sem.c      		   from_kgid_munged(user_ns, sma->sem_perm.gid),
sma              2437 ipc/sem.c      		   from_kuid_munged(user_ns, sma->sem_perm.cuid),
sma              2438 ipc/sem.c      		   from_kgid_munged(user_ns, sma->sem_perm.cgid),
sma              2440 ipc/sem.c      		   sma->sem_ctime);
sma              2442 ipc/sem.c      	complexmode_tryleave(sma);
sma              1835 security/security.c int security_sem_alloc(struct kern_ipc_perm *sma)
sma              1837 security/security.c 	int rc = lsm_ipc_alloc(sma);
sma              1841 security/security.c 	rc = call_int_hook(sem_alloc_security, 0, sma);
sma              1843 security/security.c 		security_sem_free(sma);
sma              1847 security/security.c void security_sem_free(struct kern_ipc_perm *sma)
sma              1849 security/security.c 	call_void_hook(sem_free_security, sma);
sma              1850 security/security.c 	kfree(sma->security);
sma              1851 security/security.c 	sma->security = NULL;
sma              1854 security/security.c int security_sem_associate(struct kern_ipc_perm *sma, int semflg)
sma              1856 security/security.c 	return call_int_hook(sem_associate, 0, sma, semflg);
sma              1859 security/security.c int security_sem_semctl(struct kern_ipc_perm *sma, int cmd)
sma              1861 security/security.c 	return call_int_hook(sem_semctl, 0, sma, cmd);
sma              1864 security/security.c int security_sem_semop(struct kern_ipc_perm *sma, struct sembuf *sops,
sma              1867 security/security.c 	return call_int_hook(sem_semop, 0, sma, sops, nsops, alter);
sma              6173 security/selinux/hooks.c static int selinux_sem_alloc_security(struct kern_ipc_perm *sma)
sma              6180 security/selinux/hooks.c 	isec = selinux_ipc(sma);
sma              6184 security/selinux/hooks.c 	ad.u.ipc_id = sma->key;
sma              6192 security/selinux/hooks.c static int selinux_sem_associate(struct kern_ipc_perm *sma, int semflg)
sma              6198 security/selinux/hooks.c 	isec = selinux_ipc(sma);
sma              6201 security/selinux/hooks.c 	ad.u.ipc_id = sma->key;
sma              6209 security/selinux/hooks.c static int selinux_sem_semctl(struct kern_ipc_perm *sma, int cmd)
sma              6249 security/selinux/hooks.c 	err = ipc_has_perm(sma, perms);
sma              6253 security/selinux/hooks.c static int selinux_sem_semop(struct kern_ipc_perm *sma,
sma              6263 security/selinux/hooks.c 	return ipc_has_perm(sma, perms);