Greg Kroah-Hartman | b244131 | 2017-11-01 15:07:57 +0100 | [diff] [blame] | 1 | // SPDX-License-Identifier: GPL-2.0 |
Andreas Gruenbacher | 33d3dff | 2009-12-17 21:24:29 -0500 | [diff] [blame] | 2 | #include <linux/fanotify.h> |
Eric Paris | ff0b16a | 2009-12-17 21:24:25 -0500 | [diff] [blame] | 3 | #include <linux/fdtable.h> |
| 4 | #include <linux/fsnotify_backend.h> |
| 5 | #include <linux/init.h> |
Eric Paris | 9e66e42 | 2009-12-17 21:24:34 -0500 | [diff] [blame] | 6 | #include <linux/jiffies.h> |
Eric Paris | ff0b16a | 2009-12-17 21:24:25 -0500 | [diff] [blame] | 7 | #include <linux/kernel.h> /* UINT_MAX */ |
Eric Paris | 1c52906 | 2009-12-17 21:24:28 -0500 | [diff] [blame] | 8 | #include <linux/mount.h> |
Eric Paris | 9e66e42 | 2009-12-17 21:24:34 -0500 | [diff] [blame] | 9 | #include <linux/sched.h> |
Ingo Molnar | 5b825c3 | 2017-02-02 17:54:15 +0100 | [diff] [blame] | 10 | #include <linux/sched/user.h> |
Eric W. Biederman | 7a36094 | 2017-09-26 12:45:33 -0500 | [diff] [blame^] | 11 | #include <linux/sched/signal.h> |
Eric Paris | ff0b16a | 2009-12-17 21:24:25 -0500 | [diff] [blame] | 12 | #include <linux/types.h> |
Eric Paris | 9e66e42 | 2009-12-17 21:24:34 -0500 | [diff] [blame] | 13 | #include <linux/wait.h> |
Steve Grubb | de8cd83 | 2017-10-02 20:21:39 -0400 | [diff] [blame] | 14 | #include <linux/audit.h> |
Eric Paris | ff0b16a | 2009-12-17 21:24:25 -0500 | [diff] [blame] | 15 | |
Jan Kara | 7053aee | 2014-01-21 15:48:14 -0800 | [diff] [blame] | 16 | #include "fanotify.h" |
Eric Paris | 767cd46 | 2009-12-17 21:24:25 -0500 | [diff] [blame] | 17 | |
Jan Kara | 7053aee | 2014-01-21 15:48:14 -0800 | [diff] [blame] | 18 | static bool should_merge(struct fsnotify_event *old_fsn, |
| 19 | struct fsnotify_event *new_fsn) |
| 20 | { |
| 21 | struct fanotify_event_info *old, *new; |
| 22 | |
Jan Kara | 7053aee | 2014-01-21 15:48:14 -0800 | [diff] [blame] | 23 | pr_debug("%s: old=%p new=%p\n", __func__, old_fsn, new_fsn); |
| 24 | old = FANOTIFY_E(old_fsn); |
| 25 | new = FANOTIFY_E(new_fsn); |
| 26 | |
| 27 | if (old_fsn->inode == new_fsn->inode && old->tgid == new->tgid && |
| 28 | old->path.mnt == new->path.mnt && |
| 29 | old->path.dentry == new->path.dentry) |
| 30 | return true; |
Eric Paris | 767cd46 | 2009-12-17 21:24:25 -0500 | [diff] [blame] | 31 | return false; |
| 32 | } |
| 33 | |
Eric Paris | f70ab54 | 2010-07-28 10:18:37 -0400 | [diff] [blame] | 34 | /* and the list better be locked by something too! */ |
Jan Kara | 83c0e1b | 2014-01-28 18:53:22 +0100 | [diff] [blame] | 35 | static int fanotify_merge(struct list_head *list, struct fsnotify_event *event) |
Eric Paris | 767cd46 | 2009-12-17 21:24:25 -0500 | [diff] [blame] | 36 | { |
Jan Kara | 7053aee | 2014-01-21 15:48:14 -0800 | [diff] [blame] | 37 | struct fsnotify_event *test_event; |
Eric Paris | 767cd46 | 2009-12-17 21:24:25 -0500 | [diff] [blame] | 38 | |
| 39 | pr_debug("%s: list=%p event=%p\n", __func__, list, event); |
| 40 | |
Jan Kara | 13116df | 2014-01-28 18:29:24 +0100 | [diff] [blame] | 41 | /* |
| 42 | * Don't merge a permission event with any other event so that we know |
| 43 | * the event structure we have created in fanotify_handle_event() is the |
| 44 | * one we should check for permission response. |
| 45 | */ |
Miklos Szeredi | 6685df3 | 2017-10-30 21:14:56 +0100 | [diff] [blame] | 46 | if (fanotify_is_perm_event(event->mask)) |
Jan Kara | 83c0e1b | 2014-01-28 18:53:22 +0100 | [diff] [blame] | 47 | return 0; |
Jan Kara | 13116df | 2014-01-28 18:29:24 +0100 | [diff] [blame] | 48 | |
Jan Kara | 7053aee | 2014-01-21 15:48:14 -0800 | [diff] [blame] | 49 | list_for_each_entry_reverse(test_event, list, list) { |
| 50 | if (should_merge(test_event, event)) { |
Kinglong Mee | 6c71100 | 2017-02-09 20:45:22 +0800 | [diff] [blame] | 51 | test_event->mask |= event->mask; |
| 52 | return 1; |
Eric Paris | a12a7dd | 2009-12-17 21:24:25 -0500 | [diff] [blame] | 53 | } |
| 54 | } |
Eric Paris | f70ab54 | 2010-07-28 10:18:37 -0400 | [diff] [blame] | 55 | |
Kinglong Mee | 6c71100 | 2017-02-09 20:45:22 +0800 | [diff] [blame] | 56 | return 0; |
Eric Paris | 767cd46 | 2009-12-17 21:24:25 -0500 | [diff] [blame] | 57 | } |
| 58 | |
Jan Kara | f083441 | 2014-04-03 14:46:33 -0700 | [diff] [blame] | 59 | static int fanotify_get_response(struct fsnotify_group *group, |
Jan Kara | 05f0e38 | 2016-11-10 17:45:16 +0100 | [diff] [blame] | 60 | struct fanotify_perm_event_info *event, |
| 61 | struct fsnotify_iter_info *iter_info) |
Eric Paris | 9e66e42 | 2009-12-17 21:24:34 -0500 | [diff] [blame] | 62 | { |
| 63 | int ret; |
| 64 | |
| 65 | pr_debug("%s: group=%p event=%p\n", __func__, group, event); |
| 66 | |
Jan Kara | 96d4101 | 2016-09-19 14:44:30 -0700 | [diff] [blame] | 67 | wait_event(group->fanotify_data.access_waitq, event->response); |
Eric Paris | 9e66e42 | 2009-12-17 21:24:34 -0500 | [diff] [blame] | 68 | |
| 69 | /* userspace responded, convert to something usable */ |
Steve Grubb | de8cd83 | 2017-10-02 20:21:39 -0400 | [diff] [blame] | 70 | switch (event->response & ~FAN_AUDIT) { |
Eric Paris | 9e66e42 | 2009-12-17 21:24:34 -0500 | [diff] [blame] | 71 | case FAN_ALLOW: |
| 72 | ret = 0; |
| 73 | break; |
| 74 | case FAN_DENY: |
| 75 | default: |
| 76 | ret = -EPERM; |
| 77 | } |
Steve Grubb | de8cd83 | 2017-10-02 20:21:39 -0400 | [diff] [blame] | 78 | |
| 79 | /* Check if the response should be audited */ |
| 80 | if (event->response & FAN_AUDIT) |
| 81 | audit_fanotify(event->response & ~FAN_AUDIT); |
| 82 | |
Eric Paris | 9e66e42 | 2009-12-17 21:24:34 -0500 | [diff] [blame] | 83 | event->response = 0; |
Eric Paris | 9e66e42 | 2009-12-17 21:24:34 -0500 | [diff] [blame] | 84 | |
Eric Paris | b2d8790 | 2009-12-17 21:24:34 -0500 | [diff] [blame] | 85 | pr_debug("%s: group=%p event=%p about to return ret=%d\n", __func__, |
| 86 | group, event, ret); |
| 87 | |
Eric Paris | 9e66e42 | 2009-12-17 21:24:34 -0500 | [diff] [blame] | 88 | return ret; |
| 89 | } |
Eric Paris | 9e66e42 | 2009-12-17 21:24:34 -0500 | [diff] [blame] | 90 | |
Amir Goldstein | 5b0457a | 2018-04-20 16:10:50 -0700 | [diff] [blame] | 91 | static bool fanotify_should_send_event(struct fsnotify_iter_info *iter_info, |
| 92 | u32 event_mask, const void *data, |
| 93 | int data_type) |
Eric Paris | 1c52906 | 2009-12-17 21:24:28 -0500 | [diff] [blame] | 94 | { |
Amir Goldstein | 54a307b | 2018-04-04 23:42:18 +0300 | [diff] [blame] | 95 | __u32 marks_mask = 0, marks_ignored_mask = 0; |
Al Viro | 3cd5eca | 2016-11-20 20:19:09 -0500 | [diff] [blame] | 96 | const struct path *path = data; |
Amir Goldstein | 837a393 | 2018-04-20 16:10:54 -0700 | [diff] [blame] | 97 | struct fsnotify_mark *mark; |
| 98 | int type; |
Eric Paris | 1968f5e | 2010-07-28 10:18:39 -0400 | [diff] [blame] | 99 | |
Amir Goldstein | 837a393 | 2018-04-20 16:10:54 -0700 | [diff] [blame] | 100 | pr_debug("%s: report_mask=%x mask=%x data=%p data_type=%d\n", |
| 101 | __func__, iter_info->report_mask, event_mask, data, data_type); |
Eric Paris | 1968f5e | 2010-07-28 10:18:39 -0400 | [diff] [blame] | 102 | |
Eric Paris | 1c52906 | 2009-12-17 21:24:28 -0500 | [diff] [blame] | 103 | /* if we don't have enough info to send an event to userspace say no */ |
Linus Torvalds | 2069601 | 2010-08-12 14:23:04 -0700 | [diff] [blame] | 104 | if (data_type != FSNOTIFY_EVENT_PATH) |
Eric Paris | 1c52906 | 2009-12-17 21:24:28 -0500 | [diff] [blame] | 105 | return false; |
| 106 | |
Eric Paris | e1c048b | 2010-10-28 17:21:58 -0400 | [diff] [blame] | 107 | /* sorry, fanotify only gives a damn about files and dirs */ |
David Howells | e36cb0b | 2015-01-29 12:02:35 +0000 | [diff] [blame] | 108 | if (!d_is_reg(path->dentry) && |
David Howells | 54f2a2f | 2015-01-29 12:02:36 +0000 | [diff] [blame] | 109 | !d_can_lookup(path->dentry)) |
Eric Paris | e1c048b | 2010-10-28 17:21:58 -0400 | [diff] [blame] | 110 | return false; |
| 111 | |
Amir Goldstein | 837a393 | 2018-04-20 16:10:54 -0700 | [diff] [blame] | 112 | fsnotify_foreach_obj_type(type) { |
| 113 | if (!fsnotify_iter_should_report_type(iter_info, type)) |
| 114 | continue; |
| 115 | mark = iter_info->marks[type]; |
| 116 | /* |
| 117 | * if the event is for a child and this inode doesn't care about |
| 118 | * events on the child, don't send it! |
| 119 | */ |
| 120 | if (type == FSNOTIFY_OBJ_TYPE_INODE && |
| 121 | (event_mask & FS_EVENT_ON_CHILD) && |
| 122 | !(mark->mask & FS_EVENT_ON_CHILD)) |
| 123 | continue; |
Amir Goldstein | 54a307b | 2018-04-04 23:42:18 +0300 | [diff] [blame] | 124 | |
Amir Goldstein | 837a393 | 2018-04-20 16:10:54 -0700 | [diff] [blame] | 125 | marks_mask |= mark->mask; |
| 126 | marks_ignored_mask |= mark->ignored_mask; |
Eric Paris | 1968f5e | 2010-07-28 10:18:39 -0400 | [diff] [blame] | 127 | } |
| 128 | |
David Howells | e36cb0b | 2015-01-29 12:02:35 +0000 | [diff] [blame] | 129 | if (d_is_dir(path->dentry) && |
Lino Sanfilippo | 66ba93c | 2015-02-10 14:08:27 -0800 | [diff] [blame] | 130 | !(marks_mask & FS_ISDIR & ~marks_ignored_mask)) |
Eric Paris | 8fcd652 | 2010-10-28 17:21:59 -0400 | [diff] [blame] | 131 | return false; |
| 132 | |
Suzuki K. Poulose | b3c1030 | 2015-03-12 16:26:08 -0700 | [diff] [blame] | 133 | if (event_mask & FAN_ALL_OUTGOING_EVENTS & marks_mask & |
| 134 | ~marks_ignored_mask) |
Eric Paris | 1968f5e | 2010-07-28 10:18:39 -0400 | [diff] [blame] | 135 | return true; |
| 136 | |
| 137 | return false; |
Eric Paris | 1c52906 | 2009-12-17 21:24:28 -0500 | [diff] [blame] | 138 | } |
| 139 | |
Jan Kara | 1f5eaa9 | 2018-02-21 14:10:59 +0100 | [diff] [blame] | 140 | struct fanotify_event_info *fanotify_alloc_event(struct fsnotify_group *group, |
| 141 | struct inode *inode, u32 mask, |
Al Viro | 3cd5eca | 2016-11-20 20:19:09 -0500 | [diff] [blame] | 142 | const struct path *path) |
Jan Kara | f083441 | 2014-04-03 14:46:33 -0700 | [diff] [blame] | 143 | { |
| 144 | struct fanotify_event_info *event; |
Jan Kara | 1f5eaa9 | 2018-02-21 14:10:59 +0100 | [diff] [blame] | 145 | gfp_t gfp = GFP_KERNEL; |
| 146 | |
| 147 | /* |
| 148 | * For queues with unlimited length lost events are not expected and |
| 149 | * can possibly have security implications. Avoid losing events when |
| 150 | * memory is short. |
| 151 | */ |
| 152 | if (group->max_events == UINT_MAX) |
| 153 | gfp |= __GFP_NOFAIL; |
Jan Kara | f083441 | 2014-04-03 14:46:33 -0700 | [diff] [blame] | 154 | |
Miklos Szeredi | 6685df3 | 2017-10-30 21:14:56 +0100 | [diff] [blame] | 155 | if (fanotify_is_perm_event(mask)) { |
Jan Kara | f083441 | 2014-04-03 14:46:33 -0700 | [diff] [blame] | 156 | struct fanotify_perm_event_info *pevent; |
| 157 | |
Jan Kara | 1f5eaa9 | 2018-02-21 14:10:59 +0100 | [diff] [blame] | 158 | pevent = kmem_cache_alloc(fanotify_perm_event_cachep, gfp); |
Jan Kara | f083441 | 2014-04-03 14:46:33 -0700 | [diff] [blame] | 159 | if (!pevent) |
| 160 | return NULL; |
| 161 | event = &pevent->fae; |
| 162 | pevent->response = 0; |
| 163 | goto init; |
| 164 | } |
Jan Kara | 1f5eaa9 | 2018-02-21 14:10:59 +0100 | [diff] [blame] | 165 | event = kmem_cache_alloc(fanotify_event_cachep, gfp); |
Jan Kara | f083441 | 2014-04-03 14:46:33 -0700 | [diff] [blame] | 166 | if (!event) |
| 167 | return NULL; |
| 168 | init: __maybe_unused |
| 169 | fsnotify_init_event(&event->fse, inode, mask); |
| 170 | event->tgid = get_pid(task_tgid(current)); |
| 171 | if (path) { |
| 172 | event->path = *path; |
| 173 | path_get(&event->path); |
| 174 | } else { |
| 175 | event->path.mnt = NULL; |
| 176 | event->path.dentry = NULL; |
| 177 | } |
| 178 | return event; |
| 179 | } |
| 180 | |
Jan Kara | 7053aee | 2014-01-21 15:48:14 -0800 | [diff] [blame] | 181 | static int fanotify_handle_event(struct fsnotify_group *group, |
| 182 | struct inode *inode, |
Al Viro | 3cd5eca | 2016-11-20 20:19:09 -0500 | [diff] [blame] | 183 | u32 mask, const void *data, int data_type, |
Jan Kara | 9385a84 | 2016-11-10 17:51:50 +0100 | [diff] [blame] | 184 | const unsigned char *file_name, u32 cookie, |
| 185 | struct fsnotify_iter_info *iter_info) |
Jan Kara | 7053aee | 2014-01-21 15:48:14 -0800 | [diff] [blame] | 186 | { |
| 187 | int ret = 0; |
| 188 | struct fanotify_event_info *event; |
| 189 | struct fsnotify_event *fsn_event; |
Jan Kara | 7053aee | 2014-01-21 15:48:14 -0800 | [diff] [blame] | 190 | |
| 191 | BUILD_BUG_ON(FAN_ACCESS != FS_ACCESS); |
| 192 | BUILD_BUG_ON(FAN_MODIFY != FS_MODIFY); |
| 193 | BUILD_BUG_ON(FAN_CLOSE_NOWRITE != FS_CLOSE_NOWRITE); |
| 194 | BUILD_BUG_ON(FAN_CLOSE_WRITE != FS_CLOSE_WRITE); |
| 195 | BUILD_BUG_ON(FAN_OPEN != FS_OPEN); |
| 196 | BUILD_BUG_ON(FAN_EVENT_ON_CHILD != FS_EVENT_ON_CHILD); |
| 197 | BUILD_BUG_ON(FAN_Q_OVERFLOW != FS_Q_OVERFLOW); |
| 198 | BUILD_BUG_ON(FAN_OPEN_PERM != FS_OPEN_PERM); |
| 199 | BUILD_BUG_ON(FAN_ACCESS_PERM != FS_ACCESS_PERM); |
| 200 | BUILD_BUG_ON(FAN_ONDIR != FS_ISDIR); |
| 201 | |
Amir Goldstein | 5b0457a | 2018-04-20 16:10:50 -0700 | [diff] [blame] | 202 | if (!fanotify_should_send_event(iter_info, mask, data, data_type)) |
Jan Kara | 83c4c4b | 2014-01-21 15:48:15 -0800 | [diff] [blame] | 203 | return 0; |
| 204 | |
Jan Kara | 7053aee | 2014-01-21 15:48:14 -0800 | [diff] [blame] | 205 | pr_debug("%s: group=%p inode=%p mask=%x\n", __func__, group, inode, |
| 206 | mask); |
| 207 | |
Miklos Szeredi | 6685df3 | 2017-10-30 21:14:56 +0100 | [diff] [blame] | 208 | if (fanotify_is_perm_event(mask)) { |
Miklos Szeredi | f37650f | 2017-10-30 21:14:56 +0100 | [diff] [blame] | 209 | /* |
| 210 | * fsnotify_prepare_user_wait() fails if we race with mark |
| 211 | * deletion. Just let the operation pass in that case. |
| 212 | */ |
| 213 | if (!fsnotify_prepare_user_wait(iter_info)) |
| 214 | return 0; |
| 215 | } |
Miklos Szeredi | f37650f | 2017-10-30 21:14:56 +0100 | [diff] [blame] | 216 | |
Jan Kara | 1f5eaa9 | 2018-02-21 14:10:59 +0100 | [diff] [blame] | 217 | event = fanotify_alloc_event(group, inode, mask, data); |
Miklos Szeredi | f37650f | 2017-10-30 21:14:56 +0100 | [diff] [blame] | 218 | ret = -ENOMEM; |
Jan Kara | 7b1f641 | 2018-02-21 15:07:52 +0100 | [diff] [blame] | 219 | if (unlikely(!event)) { |
| 220 | /* |
| 221 | * We don't queue overflow events for permission events as |
| 222 | * there the access is denied and so no event is in fact lost. |
| 223 | */ |
| 224 | if (!fanotify_is_perm_event(mask)) |
| 225 | fsnotify_queue_overflow(group); |
Miklos Szeredi | f37650f | 2017-10-30 21:14:56 +0100 | [diff] [blame] | 226 | goto finish; |
Jan Kara | 7b1f641 | 2018-02-21 15:07:52 +0100 | [diff] [blame] | 227 | } |
Jan Kara | 7053aee | 2014-01-21 15:48:14 -0800 | [diff] [blame] | 228 | |
| 229 | fsn_event = &event->fse; |
Jan Kara | 8ba8fa91 | 2014-08-06 16:03:26 -0700 | [diff] [blame] | 230 | ret = fsnotify_add_event(group, fsn_event, fanotify_merge); |
Jan Kara | 83c0e1b | 2014-01-28 18:53:22 +0100 | [diff] [blame] | 231 | if (ret) { |
Jan Kara | 482ef06 | 2014-02-21 19:07:54 +0100 | [diff] [blame] | 232 | /* Permission events shouldn't be merged */ |
| 233 | BUG_ON(ret == 1 && mask & FAN_ALL_PERM_EVENTS); |
Jan Kara | 7053aee | 2014-01-21 15:48:14 -0800 | [diff] [blame] | 234 | /* Our event wasn't used in the end. Free it. */ |
| 235 | fsnotify_destroy_event(group, fsn_event); |
Jan Kara | 482ef06 | 2014-02-21 19:07:54 +0100 | [diff] [blame] | 236 | |
Miklos Szeredi | f37650f | 2017-10-30 21:14:56 +0100 | [diff] [blame] | 237 | ret = 0; |
Miklos Szeredi | 6685df3 | 2017-10-30 21:14:56 +0100 | [diff] [blame] | 238 | } else if (fanotify_is_perm_event(mask)) { |
Jan Kara | 05f0e38 | 2016-11-10 17:45:16 +0100 | [diff] [blame] | 239 | ret = fanotify_get_response(group, FANOTIFY_PE(fsn_event), |
| 240 | iter_info); |
Jan Kara | 8581679 | 2014-01-28 21:38:06 +0100 | [diff] [blame] | 241 | fsnotify_destroy_event(group, fsn_event); |
| 242 | } |
Miklos Szeredi | f37650f | 2017-10-30 21:14:56 +0100 | [diff] [blame] | 243 | finish: |
Miklos Szeredi | 6685df3 | 2017-10-30 21:14:56 +0100 | [diff] [blame] | 244 | if (fanotify_is_perm_event(mask)) |
Miklos Szeredi | f37650f | 2017-10-30 21:14:56 +0100 | [diff] [blame] | 245 | fsnotify_finish_user_wait(iter_info); |
Miklos Szeredi | 6685df3 | 2017-10-30 21:14:56 +0100 | [diff] [blame] | 246 | |
Jan Kara | 7053aee | 2014-01-21 15:48:14 -0800 | [diff] [blame] | 247 | return ret; |
| 248 | } |
| 249 | |
Eric Paris | 4afeff8 | 2010-10-28 17:21:58 -0400 | [diff] [blame] | 250 | static void fanotify_free_group_priv(struct fsnotify_group *group) |
| 251 | { |
| 252 | struct user_struct *user; |
| 253 | |
| 254 | user = group->fanotify_data.user; |
| 255 | atomic_dec(&user->fanotify_listeners); |
| 256 | free_uid(user); |
| 257 | } |
| 258 | |
Jan Kara | 7053aee | 2014-01-21 15:48:14 -0800 | [diff] [blame] | 259 | static void fanotify_free_event(struct fsnotify_event *fsn_event) |
| 260 | { |
| 261 | struct fanotify_event_info *event; |
| 262 | |
| 263 | event = FANOTIFY_E(fsn_event); |
| 264 | path_put(&event->path); |
| 265 | put_pid(event->tgid); |
Miklos Szeredi | 6685df3 | 2017-10-30 21:14:56 +0100 | [diff] [blame] | 266 | if (fanotify_is_perm_event(fsn_event->mask)) { |
Jan Kara | f083441 | 2014-04-03 14:46:33 -0700 | [diff] [blame] | 267 | kmem_cache_free(fanotify_perm_event_cachep, |
| 268 | FANOTIFY_PE(fsn_event)); |
| 269 | return; |
| 270 | } |
Jan Kara | 7053aee | 2014-01-21 15:48:14 -0800 | [diff] [blame] | 271 | kmem_cache_free(fanotify_event_cachep, event); |
| 272 | } |
| 273 | |
Jan Kara | 054c636 | 2016-12-21 18:06:12 +0100 | [diff] [blame] | 274 | static void fanotify_free_mark(struct fsnotify_mark *fsn_mark) |
| 275 | { |
| 276 | kmem_cache_free(fanotify_mark_cache, fsn_mark); |
| 277 | } |
| 278 | |
Eric Paris | ff0b16a | 2009-12-17 21:24:25 -0500 | [diff] [blame] | 279 | const struct fsnotify_ops fanotify_fsnotify_ops = { |
| 280 | .handle_event = fanotify_handle_event, |
Eric Paris | 4afeff8 | 2010-10-28 17:21:58 -0400 | [diff] [blame] | 281 | .free_group_priv = fanotify_free_group_priv, |
Jan Kara | 7053aee | 2014-01-21 15:48:14 -0800 | [diff] [blame] | 282 | .free_event = fanotify_free_event, |
Jan Kara | 054c636 | 2016-12-21 18:06:12 +0100 | [diff] [blame] | 283 | .free_mark = fanotify_free_mark, |
Eric Paris | ff0b16a | 2009-12-17 21:24:25 -0500 | [diff] [blame] | 284 | }; |