Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:Reap keys of dead type.* We use three flags to make sure we see three complete cycles of the garbage* collector: the first to mark keys of that type as being dead, the second to* collect dead links and the third to clean up the dead keys. We have to be

Proto:void key_gc_keytype(struct key_type *ktype)

Type:void

Parameter:

TypeParameterName
struct key_type *ktype
101  kenter("%s", ame of the type )
103  key_gc_dead_keytype = ktype
104  Atomically set a bit in memory
105  smp_mb()
106  Atomically set a bit in memory
108  kdebug("schedule")
109  schedule_work - put work task in global workqueue*@work: job to be done* Returns %false if @work was already on the kernel-global workqueue and* %true otherwise
111  kdebug("sleep")
112  wait_on_bit - wait for a bit to be cleared*@word: the word being waited on, a kernel virtual address*@bit: the bit of the word being waited on*@mode: the task state to sleep in* There is a standard hashed waitqueue table for generic use. This
115  key_gc_dead_keytype = NULL
116  kleave("")
Caller
NameDescribe
unregister_key_typeregister_key_type - Unregister a type of key.*@ktype: The key type.* Unregister a key type and mark all the extant keys of this type as dead.* Those keys of this type are then destroyed to get rid of their payloads and