]> git.baikalelectronics.ru Git - kernel.git/commit
fanotify: allow userspace to override max marks
authorEric Paris <eparis@redhat.com>
Thu, 28 Oct 2010 21:21:58 +0000 (17:21 -0400)
committerEric Paris <eparis@redhat.com>
Thu, 28 Oct 2010 21:22:15 +0000 (17:22 -0400)
commit552a7eb6e6d1db05c45d4625c6d7d39dd05a60cb
tree54e84b0596d9915f29e56e6b6a8d8370771202c5
parent3e87527d5828e12ed7cf9b1c2212abc2a6de5374
fanotify: allow userspace to override max marks

Some fanotify groups, especially those like AV scanners, will need to place
lots of marks, particularly ignore marks.  Since ignore marks do not pin
inodes in cache and are cleared if the inode is removed from core (usually
under memory pressure) we expose an interface for listeners, with
CAP_SYS_ADMIN, to override the maximum number of marks and be allowed to
set and 'unlimited' number of marks.  Programs which make use of this
feature will be able to OOM a machine.

Signed-off-by: Eric Paris <eparis@redhat.com>
fs/notify/fanotify/fanotify_user.c
include/linux/fanotify.h