Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name: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.

Proto:static bool tomoyo_name_used_by_io_buffer(const char *string)

Type:bool

Parameter:

TypeParameterName
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  spin_lock( & Lock for protecting tomoyo_io_buffer_list. )
81  Users counter protected by tomoyo_io_buffer_list_lock. ++
82  spin_unlock( & Lock for protecting tomoyo_io_buffer_list. )
83  mutex_lock( & Exclusive lock for this structure. )
84  When i < TOMOYO_MAX_IO_READ_QUEUE cycle
85  w = w[i]
87  If w < string || w > string + size Then Continue
89  in_use = true
90  Break
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  spin_lock( & Lock for protecting tomoyo_io_buffer_list. )
94  Users counter protected by tomoyo_io_buffer_list_lock. --
95  If in_use Then Break
98  spin_unlock( & Lock for protecting tomoyo_io_buffer_list. )
99  Return in_use
Caller
NameDescribe
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.