Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:moyo_collect_entry - Try to kfree() deleted elements.* Returns nothing.

Proto:static void tomoyo_collect_entry(void)

Type:void

Parameter:Nothing

530  mutex_lock( & tomoyo_policy_lock)
537  moyo_collect_acl - Delete elements in "struct tomoyo_domain_info".*@list: Pointer to "struct list_head".* Returns nothing.
538  If Not Delete flag. || atomic_read( & Number of referring tasks. ) Then Continue
540  moyo_try_to_gc - Try to kfree() an entry.*@type: One of values in "enum tomoyo_policy_id".*@element: Pointer to "struct list_head".* Returns nothing.* Caller holds tomoyo_policy_lock mutex.
544  When id < TOMOYO_MAX_POLICY cycle moyo_collect_member - Delete elements with "struct tomoyo_acl_head".*@id: One of values in "enum tomoyo_policy_id".*@member_list: Pointer to "struct list_head".* Returns nothing.
546  When i < Group number is an integer between 0 and 255. cycle moyo_collect_acl - Delete elements in "struct tomoyo_domain_info".*@list: Pointer to "struct list_head".* Returns nothing.
555  If atomic_read( & users) > 0 Then Continue
557  atomic_set( & users, Garbage collector is trying to kfree() this element. )
558  moyo_try_to_gc - Try to kfree() an entry.*@type: One of values in "enum tomoyo_policy_id".*@element: Pointer to "struct list_head".* Returns nothing.* Caller holds tomoyo_policy_lock mutex.
562  When i < TOMOYO_MAX_GROUP cycle
568  Case i == 0
570  Break
571  Case i == 1
573  Break
574  Default
590  When i < TOMOYO_MAX_HASH cycle
591  list = tomoyo_name_list[i]
596  If atomic_read( & users) > 0 Then Continue
598  atomic_set( & users, Garbage collector is trying to kfree() this element. )
599  moyo_try_to_gc - Try to kfree() an entry.*@type: One of values in "enum tomoyo_policy_id".*@element: Pointer to "struct list_head".* Returns nothing.* Caller holds tomoyo_policy_lock mutex.
602  mutex_unlock - release the mutex*@lock: the mutex to be released* Unlock a mutex that has been locked by this task previously.* This function must not be used in interrupt context. Unlocking* of a not locked mutex is not allowed.
Caller
NameDescribe
tomoyo_gc_threadmoyo_gc_thread - Garbage collector thread function.*@unused: Unused.* Returns 0.