Lines Matching refs:key_ref
425 key_ref_t key_ref, ret, err; in search_cred_keyrings_rcu() local
435 key_ref = NULL; in search_cred_keyrings_rcu()
441 key_ref = keyring_search_rcu( in search_cred_keyrings_rcu()
443 if (!IS_ERR(key_ref)) in search_cred_keyrings_rcu()
446 switch (PTR_ERR(key_ref)) { in search_cred_keyrings_rcu()
449 ret = key_ref; in search_cred_keyrings_rcu()
452 err = key_ref; in search_cred_keyrings_rcu()
459 key_ref = keyring_search_rcu( in search_cred_keyrings_rcu()
461 if (!IS_ERR(key_ref)) in search_cred_keyrings_rcu()
464 switch (PTR_ERR(key_ref)) { in search_cred_keyrings_rcu()
470 ret = key_ref; in search_cred_keyrings_rcu()
473 err = key_ref; in search_cred_keyrings_rcu()
480 key_ref = keyring_search_rcu( in search_cred_keyrings_rcu()
483 if (!IS_ERR(key_ref)) in search_cred_keyrings_rcu()
486 switch (PTR_ERR(key_ref)) { in search_cred_keyrings_rcu()
492 ret = key_ref; in search_cred_keyrings_rcu()
495 err = key_ref; in search_cred_keyrings_rcu()
501 key_ref = keyring_search_rcu(make_key_ref(user_session, 1), in search_cred_keyrings_rcu()
505 if (!IS_ERR(key_ref)) in search_cred_keyrings_rcu()
508 switch (PTR_ERR(key_ref)) { in search_cred_keyrings_rcu()
514 ret = key_ref; in search_cred_keyrings_rcu()
517 err = key_ref; in search_cred_keyrings_rcu()
523 key_ref = ret ? ret : err; in search_cred_keyrings_rcu()
526 return key_ref; in search_cred_keyrings_rcu()
542 key_ref_t key_ref, ret = ERR_PTR(-EACCES), err; in search_process_keyrings_rcu() local
544 key_ref = search_cred_keyrings_rcu(ctx); in search_process_keyrings_rcu()
545 if (!IS_ERR(key_ref)) in search_process_keyrings_rcu()
547 err = key_ref; in search_process_keyrings_rcu()
564 key_ref = search_cred_keyrings_rcu(ctx); in search_process_keyrings_rcu()
567 if (!IS_ERR(key_ref)) in search_process_keyrings_rcu()
569 ret = key_ref; in search_process_keyrings_rcu()
575 key_ref = ERR_PTR(-ENOKEY); in search_process_keyrings_rcu()
577 key_ref = ret; in search_process_keyrings_rcu()
579 key_ref = err; in search_process_keyrings_rcu()
582 return key_ref; in search_process_keyrings_rcu()
622 key_ref_t key_ref, skey_ref; in lookup_user_key() local
627 key_ref = ERR_PTR(-ENOKEY); in lookup_user_key()
637 key_ref = ERR_PTR(ret); in lookup_user_key()
645 key_ref = make_key_ref(key, 1); in lookup_user_key()
655 key_ref = ERR_PTR(ret); in lookup_user_key()
663 key_ref = make_key_ref(key, 1); in lookup_user_key()
693 key_ref = make_key_ref(key, 1); in lookup_user_key()
700 key_ref = make_key_ref(key, 1); in lookup_user_key()
707 key_ref = make_key_ref(key, 1); in lookup_user_key()
712 key_ref = ERR_PTR(-EINVAL); in lookup_user_key()
721 key_ref = make_key_ref(key, 1); in lookup_user_key()
731 key_ref = ERR_PTR(-EKEYREVOKED); in lookup_user_key()
741 key_ref = make_key_ref(key, 1); in lookup_user_key()
745 key_ref = ERR_PTR(-EINVAL); in lookup_user_key()
751 key_ref = ERR_CAST(key); in lookup_user_key()
755 key_ref = make_key_ref(key, 0); in lookup_user_key()
768 key_ref = skey_ref; in lookup_user_key()
803 ret = key_task_permission(key_ref, ctx.cred, need_perm); in lookup_user_key()
811 return key_ref; in lookup_user_key()
814 key_ref_put(key_ref); in lookup_user_key()
815 key_ref = ERR_PTR(ret); in lookup_user_key()