Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:Garbage collect a list of unreferenced, detached keys

Proto:static noinline void key_gc_unused_keys(struct list_head *keys)

Type:void

Parameter:

TypeParameterName
struct list_head *keys
124  When Not list_empty - tests whether a list is empty*@head: the list to test. cycle
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.(next, structkey, graveyard_link)
127  state = Key state (+) or rejection error (-)
129  deletes entry from list
131  kdebug("- %u", key serial number )
132  key_check(key)
135  If state == KEY_IS_POSITIVE && destroy Then destroy(key)
138  security_key_free(key)
142  spin_lock( & lock)
143  qnkeys--
145  spin_unlock( & lock)
148  atomic_dec( & nkeys)
149  If state != KEY_IS_UNINSTANTIATED Then atomic_dec( & nikeys)
152  key_user_put( owner of this key )
153  key_put_tag( Domain of operation )
154  kfree(description)
156  memzero_explicit - Fill a region of memory (e
157  kmem_cache_free(key_jar, key)
Caller
NameDescribe
key_garbage_collectorReaper for unused keys.