Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:moyo_notify_gc - Register/unregister /sys/kernel/security/tomoyo/ users.*@head: Pointer to "struct tomoyo_io_buffer".*@is_register: True if register, false if unregister.* Returns nothing.

Proto:void tomoyo_notify_gc(struct tomoyo_io_buffer *head, const bool is_register)

Type:void

Parameter:

TypeParameterName
struct tomoyo_io_buffer *head
const boolis_register
652  bool is_write = false
654  spin_lock( & Lock for protecting tomoyo_io_buffer_list. )
655  If is_register Then
656  Users counter protected by tomoyo_io_buffer_list_lock. = 1
657  list_add - add a new entry*@new: new entry to be added*@head: list head to add it after* Insert a new entry after the specified head.* This is good for implementing stacks.
658  Else
659  is_write = Buffer for writing. != NULL
664  kfree(head)
667  spin_unlock( & Lock for protecting tomoyo_io_buffer_list. )
668  If is_write Then kthread_run - create and wake a thread.*@threadfn: the function to run until signal_pending(current).*@data: data ptr for @threadfn.*@namefmt: printf-style name for the thread.* Description: Convenient wrapper for kthread_create() followed by(moyo_gc_thread - Garbage collector thread function.*@unused: Unused.* Returns 0., NULL, "GC for TOMOYO")
Caller
NameDescribe
tomoyo_close_controlmoyo_close_control - close() for /sys/kernel/security/tomoyo/ interface.*@head: Pointer to "struct tomoyo_io_buffer".