函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:moyo_name_used_by_io_buffer - Check whether the string is used by /sys/kernel/security/tomoyo/ users or not.*@string: String to check.* Returns true if @string is used by /sys/kernel/security/tomoyo/ users,* false otherwise.

函数原型:static bool tomoyo_name_used_by_io_buffer(const char *string)

返回类型:bool

参数:

类型参数名称
const char *string
74  size等于strlen - Find the length of a string*@s: The string to be sized加1
75  bool in_use = false
77  加自旋锁
81  Users counter protected by tomoyo_io_buffer_list_lock. 自加
82  自旋锁解锁
83  mutex_lock( & Exclusive lock for this structure. )
84 i小于TOMOYO_MAX_IO_READ_QUEUE循环
85  w等于w[i]
87  如果w小于stringw大于stringsize则继续下一循环
89  in_use = true
90  退出
92  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.
93  加自旋锁
94  Users counter protected by tomoyo_io_buffer_list_lock. 自减
95  如果in_use退出
98  自旋锁解锁
99  返回:in_use
调用者
名称描述
tomoyo_try_to_gcmoyo_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.