summaryrefslogtreecommitdiffstats
path: root/include/linux/sched.h
diff options
context:
space:
mode:
authorEric Paris2010-10-28 23:21:58 +0200
committerEric Paris2010-10-28 23:22:15 +0200
commit4afeff8505cb8a38e36c1ef2bd3447c4b8f87367 (patch)
tree50a80d8773698813e4e9d9f9112079c09d493c48 /include/linux/sched.h
parentfanotify: allow userspace to override max marks (diff)
downloadkernel-qcow2-linux-4afeff8505cb8a38e36c1ef2bd3447c4b8f87367.tar.gz
kernel-qcow2-linux-4afeff8505cb8a38e36c1ef2bd3447c4b8f87367.tar.xz
kernel-qcow2-linux-4afeff8505cb8a38e36c1ef2bd3447c4b8f87367.zip
fanotify: limit number of listeners per user
fanotify currently has no limit on the number of listeners a given user can have open. This patch limits the total number of listeners per user to 128. This is the same as the inotify default limit. Signed-off-by: Eric Paris <eparis@redhat.com>
Diffstat (limited to 'include/linux/sched.h')
-rw-r--r--include/linux/sched.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/linux/sched.h b/include/linux/sched.h
index be7adb7588e5..6f420baf37ca 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -672,6 +672,9 @@ struct user_struct {
atomic_t inotify_watches; /* How many inotify watches does this user have? */
atomic_t inotify_devs; /* How many inotify devs does this user have opened? */
#endif
+#ifdef CONFIG_FANOTIFY
+ atomic_t fanotify_listeners;
+#endif
#ifdef CONFIG_EPOLL
atomic_t epoll_watches; /* The number of file descriptors currently watched */
#endif