函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:Find a key by its serial number.

函数原型:struct key *key_lookup(key_serial_t id)

返回类型:struct key

参数:

类型参数名称
key_serial_tid
660  加自旋锁
663  n等于rb_node
664 n循环
665  key等于rb_entry(n, structkey, serial_node)
667  如果id小于 key serial number n等于rb_left
669  否则如果id大于 key serial number n等于rb_right
671  否则转到:found
675  not_found :
676  key等于错误号
677  转到:error
679  found :
683  如果非_inc_not_zero - increment a refcount unless it is 0*@r: the refcount to increment* Similar to atomic_inc_not_zero(), but will saturate at REFCOUNT_SATURATED* and WARN.* Provides no memory ordering, it is assumed the caller has guaranteed the则转到:not_found
686  error :
687  自旋锁解锁
688  返回:key
调用者
名称描述
lookup_user_keyLook up a key ID given us by userspace with a given permissions mask to get* the key it refers to.* Flags can be passed to request that special keyrings be created if referred* to directly, to permit partially constructed keys to be found and to skip