函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:moyo_collect_entry - Try to kfree() deleted elements.* Returns nothing.

函数原型:static void tomoyo_collect_entry(void)

返回类型:void

参数:

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  如果非 Delete flag. atomic_read( & Number of referring tasks. )则继续下一循环
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 id小于TOMOYO_MAX_POLICY循环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 i小于Group number is an integer between 0 and 255. 循环moyo_collect_acl - Delete elements in "struct tomoyo_domain_info".*@list: Pointer to "struct list_head".* Returns nothing.
555  如果atomic_read( & users)大于0则继续下一循环
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 i小于TOMOYO_MAX_GROUP循环
568  :i恒等于0
570  退出
571  :i恒等于1
573  退出
574  默认
590 i小于TOMOYO_MAX_HASH循环
591  list等于tomoyo_name_list[i]
596  如果atomic_read( & users)大于0则继续下一循环
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.
调用者
名称描述
tomoyo_gc_threadmoyo_gc_thread - Garbage collector thread function.*@unused: Unused.* Returns 0.