Lines Matching defs:authkey
121 * drop authkey->sem before doing operations that may sleep.
123 struct request_key_auth *request_key_auth_get(struct key *authkey)
127 down_read(&authkey->sem);
128 rka = dereference_key_locked(authkey);
129 if (rka && !test_bit(KEY_FLAG_REVOKED, &authkey->flags))
133 up_read(&authkey->sem);
195 struct key *authkey = NULL;
245 authkey = key_alloc(&key_type_request_key_auth, desc,
249 if (IS_ERR(authkey)) {
250 ret = PTR_ERR(authkey);
255 ret = key_instantiate_and_link(authkey, rka, 0, NULL, NULL);
259 kleave(" = {%d,%d}", authkey->serial, refcount_read(&authkey->usage));
260 return authkey;
263 key_put(authkey);
288 struct key *authkey;
298 authkey = ERR_CAST(authkey_ref);
299 if (authkey == ERR_PTR(-EAGAIN))
300 authkey = ERR_PTR(-ENOKEY);
304 authkey = key_ref_to_ptr(authkey_ref);
305 if (test_bit(KEY_FLAG_REVOKED, &authkey->flags)) {
306 key_put(authkey);
307 authkey = ERR_PTR(-EKEYREVOKED);
311 return authkey;