summaryrefslogtreecommitdiffstats
path: root/fs/notify/fanotify/fanotify.h
diff options
context:
space:
mode:
authorJan Kara2018-02-21 14:10:59 +0100
committerJan Kara2018-02-27 10:25:33 +0100
commit1f5eaa90010ed7cf0ae90a526c48657d02c6086f (patch)
treeaccb9faea9a7b5160d5e35f320007938e2f76af9 /fs/notify/fanotify/fanotify.h
parentudf: Remove never implemented mount options (diff)
downloadkernel-qcow2-linux-1f5eaa90010ed7cf0ae90a526c48657d02c6086f.tar.gz
kernel-qcow2-linux-1f5eaa90010ed7cf0ae90a526c48657d02c6086f.tar.xz
kernel-qcow2-linux-1f5eaa90010ed7cf0ae90a526c48657d02c6086f.zip
fanotify: Avoid lost events due to ENOMEM for unlimited queues
Fanotify queues of unlimited length do not expect events can be lost. Since these queues are used for system auditing and other security related tasks, loosing events can even have security implications. Currently, since the allocation is small (32-bytes), it cannot fail however when we start accounting events in memcgs, allocation can start failing. So avoid loosing events due to failure to allocate memory by making event allocation use __GFP_NOFAIL. Reviewed-by: Amir Goldstein <amir73il@gmail.com> Signed-off-by: Jan Kara <jack@suse.cz>
Diffstat (limited to 'fs/notify/fanotify/fanotify.h')
-rw-r--r--fs/notify/fanotify/fanotify.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/notify/fanotify/fanotify.h b/fs/notify/fanotify/fanotify.h
index 256d9d1ddea9..8609ba06f474 100644
--- a/fs/notify/fanotify/fanotify.h
+++ b/fs/notify/fanotify/fanotify.h
@@ -52,5 +52,6 @@ static inline struct fanotify_event_info *FANOTIFY_E(struct fsnotify_event *fse)
return container_of(fse, struct fanotify_event_info, fse);
}
-struct fanotify_event_info *fanotify_alloc_event(struct inode *inode, u32 mask,
+struct fanotify_event_info *fanotify_alloc_event(struct fsnotify_group *group,
+ struct inode *inode, u32 mask,
const struct path *path);