diff options
author | Jan Kara <jack@suse.cz> | 2018-11-12 09:54:48 -0500 |
---|---|---|
committer | Paul Moore <paul@paul-moore.com> | 2018-11-12 09:54:48 -0500 |
commit | b1e4603b92d8aef8776e5673dc13fedb68d32ea4 (patch) | |
tree | 6d9afd1e5a4cc7757365e2c6f42308796ef9b4c6 /README | |
parent | a5789b07b35aa56569dff762bfc063303a9ccb95 (diff) |
audit: Fix possible tagging failures
Audit tree code is replacing marks attached to inodes in non-atomic way.
Thus fsnotify_find_mark() in tag_chunk() may find a mark that belongs to
a chunk that is no longer valid one and will soon be destroyed. Tags
added to such chunk will be simply lost.
Fix the problem by making sure old mark is marked as going away (through
fsnotify_detach_mark()) before dropping mark_mutex and thus in an atomic
way wrt tag_chunk(). Note that this does not fix the problem completely
as if tag_chunk() finds a mark that is going away, it fails with
-ENOENT. But at least the failure is not silent and currently there's no
way to search for another fsnotify mark attached to the inode. We'll fix
this problem in later patch.
Reviewed-by: Richard Guy Briggs <rgb@redhat.com>
Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Paul Moore <paul@paul-moore.com>
Diffstat (limited to 'README')
0 files changed, 0 insertions, 0 deletions