Lines Matching refs:uctx

466 	struct xfrm_user_sec_ctx *uctx = NULL;  in pfkey_sadb2xfrm_user_sec_ctx()  local
469 uctx = kmalloc((sizeof(*uctx)+ctx_size), gfp); in pfkey_sadb2xfrm_user_sec_ctx()
471 if (!uctx) in pfkey_sadb2xfrm_user_sec_ctx()
474 uctx->len = pfkey_sec_ctx_len(sec_ctx); in pfkey_sadb2xfrm_user_sec_ctx()
475 uctx->exttype = sec_ctx->sadb_x_sec_exttype; in pfkey_sadb2xfrm_user_sec_ctx()
476 uctx->ctx_doi = sec_ctx->sadb_x_ctx_doi; in pfkey_sadb2xfrm_user_sec_ctx()
477 uctx->ctx_alg = sec_ctx->sadb_x_ctx_alg; in pfkey_sadb2xfrm_user_sec_ctx()
478 uctx->ctx_len = sec_ctx->sadb_x_ctx_len; in pfkey_sadb2xfrm_user_sec_ctx()
479 memcpy(uctx + 1, sec_ctx + 1, in pfkey_sadb2xfrm_user_sec_ctx()
480 uctx->ctx_len); in pfkey_sadb2xfrm_user_sec_ctx()
482 return uctx; in pfkey_sadb2xfrm_user_sec_ctx()
1154 struct xfrm_user_sec_ctx *uctx = pfkey_sadb2xfrm_user_sec_ctx(sec_ctx, GFP_KERNEL); in pfkey_msg2xfrm_state() local
1156 if (!uctx) in pfkey_msg2xfrm_state()
1159 err = security_xfrm_state_alloc(x, uctx); in pfkey_msg2xfrm_state()
1160 kfree(uctx); in pfkey_msg2xfrm_state()
2296 struct xfrm_user_sec_ctx *uctx = pfkey_sadb2xfrm_user_sec_ctx(sec_ctx, GFP_KERNEL); in pfkey_spdadd() local
2298 if (!uctx) { in pfkey_spdadd()
2303 err = security_xfrm_policy_alloc(&xp->security, uctx, GFP_KERNEL); in pfkey_spdadd()
2304 kfree(uctx); in pfkey_spdadd()
2398 struct xfrm_user_sec_ctx *uctx = pfkey_sadb2xfrm_user_sec_ctx(sec_ctx, GFP_KERNEL); in pfkey_spddelete() local
2400 if (!uctx) in pfkey_spddelete()
2403 err = security_xfrm_policy_alloc(&pol_ctx, uctx, GFP_KERNEL); in pfkey_spddelete()
2404 kfree(uctx); in pfkey_spddelete()
3322 struct xfrm_user_sec_ctx *uctx; in pfkey_compile_policy() local
3333 uctx = pfkey_sadb2xfrm_user_sec_ctx(sec_ctx, GFP_ATOMIC); in pfkey_compile_policy()
3334 *dir = security_xfrm_policy_alloc(&xp->security, uctx, GFP_ATOMIC); in pfkey_compile_policy()
3335 kfree(uctx); in pfkey_compile_policy()