函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:fs\notify\fanotify\fanotify.c Create Date:2022-07-29 10:49:47
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:Wait for response to permission event

函数原型:static int fanotify_get_response(struct fsnotify_group *group, struct fanotify_perm_event *event, struct fsnotify_iter_info *iter_info)

返回类型:int

参数:

类型参数名称
struct fsnotify_group *group
struct fanotify_perm_event *event
struct fsnotify_iter_info *iter_info
93  pr_debug("%s: group=%p event=%p\n", __func__, group, event)
95  ret等于wait_event_killable - sleep until a condition gets true*@wq_head: the waitqueue to wait on*@condition: a C expression for the event to wait for* The process is put to sleep (TASK_KILLABLE) until the*@condition evaluates to true or a signal is received.(access_waitq, state of the event == FAN_EVENT_ANSWERED)
98  如果ret小于0则
99  加自旋锁
101  如果state of the event 恒等于FAN_EVENT_REPORTED
105  返回:ret
108  如果state of the event 恒等于FAN_EVENT_INITfsnotify_remove_queued_event(group, & fse)
115  自旋锁解锁
116  转到:out
122  ret等于0
123  退出
124  : & == FAN_DENY
125  默认
126  ret等于负EPERM
130  如果userspace answer to the event 按位与Bit mask to create audit record for result audit_fanotify(userspace answer to the event & ~Bit mask to create audit record for result )
133  pr_debug("%s: group=%p event=%p about to return ret=%d\n", __func__, group, event, ret)
135  out :
136  fsnotify_destroy_event(group, & fse)
138  返回:ret
调用者
名称描述
fanotify_handle_event