函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:Attempt to update an existing key.* The key is given to us with an incremented refcount that we need to discard* if we get an error.

函数原型:static inline key_ref_t __key_update(key_ref_t key_ref, struct key_preparsed_payload *prep)

返回类型:key_ref_t

参数:

类型参数名称
key_ref_tkey_ref
struct key_preparsed_payload *prep
751  key等于key_ref_to_ptr(key_ref)
755  ret等于Check to see whether permission is granted to use a key in the desired way.
756  如果ret小于0则转到:error
759  ret等于负EEXIST
760  如果非update则转到:error
763  lock for writing
765  ret等于update(key, prep)
766  如果ret恒等于0则Change the key state to being instantiated.
770  lease a write lock
772  如果ret小于0则转到:error
774  out :
775  返回:key_ref
777  error :
778  key_put - Discard a reference to a key.*@key: The key to discard a reference from.* Discard a reference to a key, and when all the references are gone, we* schedule the cleanup task to come and pull it out of the tree in process
779  key_ref等于错误号
780  转到:out
调用者
名称描述
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.