Lines Matching refs:ctx
22 static struct key *check_cached_key(struct keyring_search_context *ctx) in check_cached_key() argument
28 ctx->match_data.cmp(key, &ctx->match_data) && in check_cached_key()
369 static int construct_alloc_key(struct keyring_search_context *ctx, in construct_alloc_key() argument
382 ctx->index_key.type->name, ctx->index_key.description); in construct_alloc_key()
389 if (ctx->index_key.type->read) in construct_alloc_key()
391 if (ctx->index_key.type == &key_type_keyring || in construct_alloc_key()
392 ctx->index_key.type->update) in construct_alloc_key()
395 key = key_alloc(ctx->index_key.type, ctx->index_key.description, in construct_alloc_key()
396 ctx->cred->fsuid, ctx->cred->fsgid, ctx->cred, in construct_alloc_key()
422 key_ref = search_process_keyrings_rcu(ctx); in construct_alloc_key()
489 static struct key *construct_key_and_link(struct keyring_search_context *ctx, in construct_key_and_link() argument
502 if (ctx->index_key.type == &key_type_keyring) in construct_key_and_link()
515 ret = construct_alloc_key(ctx, dest_keyring, flags, user, &key); in construct_key_and_link()
583 struct keyring_search_context ctx = { in request_key_and_link() local
601 ctx.index_key.type->name, ctx.index_key.description, in request_key_and_link()
605 ret = type->match_preparse(&ctx.match_data); in request_key_and_link()
612 key = check_cached_key(&ctx); in request_key_and_link()
618 key_ref = search_process_keyrings_rcu(&ctx); in request_key_and_link()
653 key = construct_key_and_link(&ctx, callout_info, callout_len, in request_key_and_link()
659 type->match_free(&ctx.match_data); in request_key_and_link()
786 struct keyring_search_context ctx = { in request_key_rcu() local
803 key = check_cached_key(&ctx); in request_key_rcu()
808 key_ref = search_process_keyrings_rcu(&ctx); in request_key_rcu()