Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:security\keys\keyring.c Create Date:2022-07-28 18:18:17
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:Lock keyring for link.

Proto:int __key_link_lock(struct key *keyring, const struct keyring_index_key *index_key)__acquires(&keyring->sem) __acquires(&keyring_serialise_link_lock)

Type:int

Parameter:

TypeParameterName
struct key *keyring
const struct keyring_index_key *index_key
1243  If type of key != key_type_keyring Then Return -ENOTDIR
1246  lock for writing
1251  If type == key_type_keyring Then mutex_lock( & Semaphore to serialise link/link calls to prevent two link calls in parallel* introducing a cycle.)
1254  Return 0
Caller
NameDescribe
key_reject_and_linkkey_reject_and_link - Negatively instantiate a key and link it into the keyring.*@key: The key to instantiate.*@timeout: The timeout on the negative key.*@error: The error to return when the key is hit.
key_create_or_updatekey_create_or_update - Update or create and instantiate a key.*@keyring_ref: A pointer to the destination keyring with possession flag.*@type: The type of key.*@description: The searchable description for the key.
key_linkkey_link - Link a key to a keyring*@keyring: The keyring to make the link in
construct_alloc_keyAllocate a new key in under-construction state and attempt to link it in to* the requested keyring.* May return a key that's already under construction instead if there was a* race between two thread calling request_key().