summaryrefslogtreecommitdiffstats
path: root/kernel/audit_fsnotify.c
diff options
context:
space:
mode:
authorAmir Goldstein <amir73il@gmail.com>2020-07-22 14:58:43 +0200
committerJan Kara <jack@suse.cz>2020-07-27 23:16:33 +0200
commit7dbe6080167860df0bf8627e55fd5154f366cc7a (patch)
treed1f584c869fbf1309d5bc759e66f4cb6cde549b7 /kernel/audit_fsnotify.c
parentinotify: do not set FS_EVENT_ON_CHILD in non-dir mark mask (diff)
downloadlinux-7dbe6080167860df0bf8627e55fd5154f366cc7a.tar.xz
linux-7dbe6080167860df0bf8627e55fd5154f366cc7a.zip
audit: do not set FS_EVENT_ON_CHILD in audit marks mask
The audit group marks mask does not contain any events possible on a child so setting the flag FS_EVENT_ON_CHILD in the mask is counter productive. It may lead to the undesired outcome of setting the dentry flag DCACHE_FSNOTIFY_PARENT_WATCHED on a directory inode even though it is not watching children, because the audit mark contribute the flag FS_EVENT_ON_CHILD to the inode's fsnotify_mask and another mark could be contributing an event that is possible on child to the inode's mask. Furthermore in the following patches we want to use FS_EVENT_ON_CHILD for non-dir inodes for other purposes so stop using the flag. Link: https://lore.kernel.org/r/20200722125849.17418-4-amir73il@gmail.com Signed-off-by: Amir Goldstein <amir73il@gmail.com> Signed-off-by: Jan Kara <jack@suse.cz>
Diffstat (limited to 'kernel/audit_fsnotify.c')
-rw-r--r--kernel/audit_fsnotify.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/audit_fsnotify.c b/kernel/audit_fsnotify.c
index 30ca239285a3..bd3a6b79316a 100644
--- a/kernel/audit_fsnotify.c
+++ b/kernel/audit_fsnotify.c
@@ -36,7 +36,7 @@ static struct fsnotify_group *audit_fsnotify_group;
/* fsnotify events we care about. */
#define AUDIT_FS_EVENTS (FS_MOVE | FS_CREATE | FS_DELETE | FS_DELETE_SELF |\
- FS_MOVE_SELF | FS_EVENT_ON_CHILD)
+ FS_MOVE_SELF)
static void audit_fsnotify_mark_free(struct audit_fsnotify_mark *audit_mark)
{