Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:fs\notify\fanotify\fanotify.c Create Date:2022-07-28 20:18:06
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:Wait for response to permission event

Proto:static int fanotify_get_response(struct fsnotify_group *group, struct fanotify_perm_event *event, struct fsnotify_iter_info *iter_info)

Type:int

Parameter:

TypeParameterName
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  If ret < 0 Then
99  spin_lock( & protect the notification_list )
105  Return ret
108  If state of the event == FAN_EVENT_INIT Then fsnotify_remove_queued_event(group, & fse)
115  spin_unlock( & protect the notification_list )
116  Go to out
122  ret = 0
123  Break
124  Case & == FAN_DENY
125  Default
126  ret = -EPERM
130  If userspace answer to the event & Bit mask to create audit record for result Then 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  Return ret
Caller
NameDescribe
fanotify_handle_event