Lines Matching refs:rtk
2405 struct role_trans_key *rtk = NULL; in policydb_read() local
2585 rtk = kmalloc(sizeof(*rtk), GFP_KERNEL); in policydb_read()
2586 if (!rtk) in policydb_read()
2599 rtk->role = le32_to_cpu(buf[0]); in policydb_read()
2600 rtk->type = le32_to_cpu(buf[1]); in policydb_read()
2606 rtk->tclass = le32_to_cpu(buf[0]); in policydb_read()
2608 rtk->tclass = p->process_class; in policydb_read()
2611 if (!policydb_role_isvalid(p, rtk->role) || in policydb_read()
2612 !policydb_type_isvalid(p, rtk->type) || in policydb_read()
2613 !policydb_class_isvalid(p, rtk->tclass) || in policydb_read()
2617 rc = hashtab_insert(&p->role_tr, rtk, rtd, roletr_key_params); in policydb_read()
2621 rtk = NULL; in policydb_read()
2719 kfree(rtk); in policydb_read()
2840 struct role_trans_key *rtk = key; in role_trans_write_one() local
2848 buf[0] = cpu_to_le32(rtk->role); in role_trans_write_one()
2849 buf[1] = cpu_to_le32(rtk->type); in role_trans_write_one()
2855 buf[0] = cpu_to_le32(rtk->tclass); in role_trans_write_one()