return search_process_keyrings_aux(type, description, type->match); 
struct request_key_auth *rka; struct key *key, *ret, *err, *instkey;  /* we want to return -EAGAIN or -ENOKEY if any of the keyrings were * searchable, but we failed to find a key or we found a negative key; * otherwise we want to return a sample error (probably -EACCES) if * none of the keyrings were searchable * * in terms of priority: success > -ENOKEY > -EAGAIN > other error */ key = NULL; ret = NULL; err = ERR_PTR(-EAGAIN);  /* search the thread keyring first */ if (context->thread_keyring) { key = keyring_search_aux(context->thread_keyring, context, type, description, match); if (!IS_ERR(key)) goto found;  switch (PTR_ERR(key)) { case -EAGAIN: /* no key */ if (ret) break; case -ENOKEY: /* negative key */ ret = key; break; default: err = key; break; } }  /* search the process keyring second */ if (context->signal->process_keyring) { key = keyring_search_aux(context->signal->process_keyring, context, type, description, match); if (!IS_ERR(key)) goto found;  switch (PTR_ERR(key)) { case -EAGAIN: /* no key */ if (ret) break; case -ENOKEY: /* negative key */ ret = key; break; default: err = key; break; } }  /* search the session keyring */ if (context->signal->session_keyring) { rcu_read_lock(); key = keyring_search_aux( rcu_dereference(context->signal->session_keyring), context, type, description, match); rcu_read_unlock();  if (!IS_ERR(key)) goto found;  switch (PTR_ERR(key)) { case -EAGAIN: /* no key */ if (ret) break; case -ENOKEY: /* negative key */ ret = key; break; default: err = key; break; }  /* if this process has a session keyring and that has an * instantiation authorisation key in the bottom level, then we * also search the keyrings of the process mentioned there */ if (context != current) goto no_key;  rcu_read_lock(); instkey = __keyring_search_one( rcu_dereference(context->signal->session_keyring), &key_type_request_key_auth, NULL, 0); rcu_read_unlock();  if (IS_ERR(instkey)) goto no_key;  rka = instkey->payload.data;  key = search_process_keyrings(type, description, match, rka->context); key_put(instkey);  if (!IS_ERR(key)) goto found;  switch (PTR_ERR(key)) { case -EAGAIN: /* no key */ if (ret) break; case -ENOKEY: /* negative key */ ret = key; break; default: err = key; break; } } /* or search the user-session keyring */ else { key = keyring_search_aux(context->user->session_keyring, context, type, description, match); if (!IS_ERR(key)) goto found;  switch (PTR_ERR(key)) { case -EAGAIN: /* no key */ if (ret) break; case -ENOKEY: /* negative key */ ret = key; break; default: err = key; break; } }   no_key: /* no key - decide on the error we're going to go for */ key = ret ? ret : err;  found: return key; 
struct key *search_process_keyrings(struct key_type *type,				    const char *description){	return search_process_keyrings_aux(type, description, type->match);} /* end search_process_keyrings() */
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/3e30148c3d524a9c1c63ca28261bc24c457eb07a/process_keys.c/buggy/security/keys/process_keys.c