Lines Matching refs:cxt

47 void aa_free_task_context(struct aa_task_cxt *cxt)  in aa_free_task_context()  argument
49 if (cxt) { in aa_free_task_context()
50 aa_put_profile(cxt->profile); in aa_free_task_context()
51 aa_put_profile(cxt->previous); in aa_free_task_context()
52 aa_put_profile(cxt->onexec); in aa_free_task_context()
54 kzfree(cxt); in aa_free_task_context()
96 struct aa_task_cxt *cxt = current_cxt(); in aa_replace_current_profile() local
100 if (cxt->profile == profile) in aa_replace_current_profile()
107 cxt = cred_cxt(new); in aa_replace_current_profile()
108 if (unconfined(profile) || (cxt->profile->ns != profile->ns)) in aa_replace_current_profile()
112 aa_clear_task_cxt_trans(cxt); in aa_replace_current_profile()
119 aa_put_profile(cxt->profile); in aa_replace_current_profile()
120 cxt->profile = profile; in aa_replace_current_profile()
134 struct aa_task_cxt *cxt; in aa_set_current_onexec() local
139 cxt = cred_cxt(new); in aa_set_current_onexec()
141 aa_put_profile(cxt->onexec); in aa_set_current_onexec()
142 cxt->onexec = profile; in aa_set_current_onexec()
160 struct aa_task_cxt *cxt; in aa_set_current_hat() local
166 cxt = cred_cxt(new); in aa_set_current_hat()
167 if (!cxt->previous) { in aa_set_current_hat()
169 cxt->previous = cxt->profile; in aa_set_current_hat()
170 cxt->token = token; in aa_set_current_hat()
171 } else if (cxt->token == token) { in aa_set_current_hat()
172 aa_put_profile(cxt->profile); in aa_set_current_hat()
178 cxt->profile = aa_get_newest_profile(profile); in aa_set_current_hat()
180 aa_put_profile(cxt->onexec); in aa_set_current_hat()
181 cxt->onexec = NULL; in aa_set_current_hat()
198 struct aa_task_cxt *cxt; in aa_restore_previous_profile() local
203 cxt = cred_cxt(new); in aa_restore_previous_profile()
204 if (cxt->token != token) { in aa_restore_previous_profile()
209 if (!cxt->previous) { in aa_restore_previous_profile()
214 aa_put_profile(cxt->profile); in aa_restore_previous_profile()
215 cxt->profile = aa_get_newest_profile(cxt->previous); in aa_restore_previous_profile()
216 BUG_ON(!cxt->profile); in aa_restore_previous_profile()
218 aa_clear_task_cxt_trans(cxt); in aa_restore_previous_profile()