函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:security\keys\key.c Create Date:2022-07-27 19:50:36
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:Instantiate a key and link it into the target keyring atomically. Must be* called with the target keyring's semaphore writelocked. The target key's* semaphore need not be locked as instantiation is serialised by* key_construction_mutex.

函数原型:static int __key_instantiate_and_link(struct key *key, struct key_preparsed_payload *prep, struct key *keyring, struct key *authkey, struct assoc_array_edit **_edit)

返回类型:int

参数:

类型参数名称
struct key *key
struct key_preparsed_payload *prep
struct key *keyring
struct key *authkey
struct assoc_array_edit **_edit
429  key_check(key)
430  key_check(keyring)
432  awaken等于0
433  ret等于负EBUSY
435  mutex_lock( & We serialise key instantiation and link )
438  如果 Key state (+) or rejection error (-) 恒等于KEY_IS_UNINSTANTIATED
440  ret等于instantiate(key, prep)
442  如果ret恒等于0则
444  atomic_inc( & nikeys)
451  如果keyring
469  mutex_unlock - release the mutex*@lock: the mutex to be released* Unlock a mutex that has been locked by this task previously.* This function must not be used in interrupt context. Unlocking* of a not locked mutex is not allowed.
472  如果awakenwake_up_bit - wake up a waiter on a bit*@word: the word being waited on, a kernel virtual address*@bit: the bit of the word being waited on* There is a standard hashed waitqueue table for generic use
475  返回:ret
调用者
名称描述
key_instantiate_and_linkkey_instantiate_and_link - Instantiate a key and link it into the keyring.*@key: The key to instantiate.*@data: The data to use to instantiate the keyring.*@datalen: The length of @data.*@keyring: Keyring to create a link in on success (or NULL).
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.