函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:Garbage collect a list of unreferenced, detached keys

函数原型:static noinline void key_gc_unused_keys(struct list_head *keys)

返回类型:void

参数:

类型参数名称
struct list_head *keys
124  当非链表为空循环
125  key等于list_entry - get the struct for this entry*@ptr: the &struct list_head pointer.*@type: the type of the struct this is embedded in.*@member: the name of the list_head within the struct.(链表后项, structkey, graveyard_link)
127  state等于 Key state (+) or rejection error (-)
129  删除链表项
131  kdebug("- %u", key serial number )
132  key_check(key)
135  如果state恒等于KEY_IS_POSITIVEdestroydestroy(key)
138  security_key_free(key)
142  加自旋锁
143  qnkeys自减
148  atomic_dec( & nkeys)
149  如果state不等于KEY_IS_UNINSTANTIATEDatomic_dec( & nikeys)
152  key_user_put( owner of this key )
153  key_put_tag( Domain of operation )
154  释放内存
156  memzero_explicit - Fill a region of memory (e
157  kmem_cache_free(key_jar, key)
调用者
名称描述
key_garbage_collectorReaper for unused keys.