Lines Matching refs:uctx
470 struct xfrm_user_sec_ctx *uctx = NULL; in pfkey_sadb2xfrm_user_sec_ctx() local
473 uctx = kmalloc((sizeof(*uctx)+ctx_size), gfp); in pfkey_sadb2xfrm_user_sec_ctx()
475 if (!uctx) in pfkey_sadb2xfrm_user_sec_ctx()
478 uctx->len = pfkey_sec_ctx_len(sec_ctx); in pfkey_sadb2xfrm_user_sec_ctx()
479 uctx->exttype = sec_ctx->sadb_x_sec_exttype; in pfkey_sadb2xfrm_user_sec_ctx()
480 uctx->ctx_doi = sec_ctx->sadb_x_ctx_doi; in pfkey_sadb2xfrm_user_sec_ctx()
481 uctx->ctx_alg = sec_ctx->sadb_x_ctx_alg; in pfkey_sadb2xfrm_user_sec_ctx()
482 uctx->ctx_len = sec_ctx->sadb_x_ctx_len; in pfkey_sadb2xfrm_user_sec_ctx()
483 memcpy(uctx + 1, sec_ctx + 1, in pfkey_sadb2xfrm_user_sec_ctx()
484 uctx->ctx_len); in pfkey_sadb2xfrm_user_sec_ctx()
486 return uctx; in pfkey_sadb2xfrm_user_sec_ctx()
1158 struct xfrm_user_sec_ctx *uctx = pfkey_sadb2xfrm_user_sec_ctx(sec_ctx, GFP_KERNEL); in pfkey_msg2xfrm_state() local
1160 if (!uctx) in pfkey_msg2xfrm_state()
1163 err = security_xfrm_state_alloc(x, uctx); in pfkey_msg2xfrm_state()
1164 kfree(uctx); in pfkey_msg2xfrm_state()
2304 struct xfrm_user_sec_ctx *uctx = pfkey_sadb2xfrm_user_sec_ctx(sec_ctx, GFP_KERNEL); in pfkey_spdadd() local
2306 if (!uctx) { in pfkey_spdadd()
2311 err = security_xfrm_policy_alloc(&xp->security, uctx, GFP_KERNEL); in pfkey_spdadd()
2312 kfree(uctx); in pfkey_spdadd()
2406 struct xfrm_user_sec_ctx *uctx = pfkey_sadb2xfrm_user_sec_ctx(sec_ctx, GFP_KERNEL); in pfkey_spddelete() local
2408 if (!uctx) in pfkey_spddelete()
2411 err = security_xfrm_policy_alloc(&pol_ctx, uctx, GFP_KERNEL); in pfkey_spddelete()
2412 kfree(uctx); in pfkey_spddelete()
3330 struct xfrm_user_sec_ctx *uctx; in pfkey_compile_policy() local
3341 uctx = pfkey_sadb2xfrm_user_sec_ctx(sec_ctx, GFP_ATOMIC); in pfkey_compile_policy()
3342 *dir = security_xfrm_policy_alloc(&xp->security, uctx, GFP_ATOMIC); in pfkey_compile_policy()
3343 kfree(uctx); in pfkey_compile_policy()