Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:moyo_struct_used_by_io_buffer - Check whether the list element is used by /sys/kernel/security/tomoyo/ users or not.*@element: Pointer to "struct list_head".* Returns true if @element is used by /sys/kernel/security/tomoyo/ users,* false otherwise.

Proto:static bool tomoyo_struct_used_by_io_buffer(const struct list_head *element)

Type:bool

Parameter:

TypeParameterName
const struct list_head *element
43  bool in_use = false
45  spin_lock( & Lock for protecting tomoyo_io_buffer_list. )
47  Users counter protected by tomoyo_io_buffer_list_lock. ++
48  spin_unlock( & Lock for protecting tomoyo_io_buffer_list. )
49  mutex_lock( & Exclusive lock for this structure. )
50  If domain == element || group == element || acl == element || list == element Then in_use = true
53  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.
54  spin_lock( & Lock for protecting tomoyo_io_buffer_list. )
55  Users counter protected by tomoyo_io_buffer_list_lock. --
56  If in_use Then Break
59  spin_unlock( & Lock for protecting tomoyo_io_buffer_list. )
60  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.