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 | a5789b07b35aa56569dff762bfc063303a9ccb95 (patch) | |
tree | 72090bebf2b65c0bd3f312166cf2a0a4514cfea0 /kernel/sys.c | |
parent | 9f16d2e6241b2fc664523f17d74adda7489f496b (diff) | |
download | linux-a5789b07b35aa56569dff762bfc063303a9ccb95.tar.gz linux-a5789b07b35aa56569dff762bfc063303a9ccb95.tar.bz2 linux-a5789b07b35aa56569dff762bfc063303a9ccb95.zip |
audit: Fix possible spurious -ENOSPC error
When an inode is tagged with a tree, tag_chunk() checks whether there is
audit_tree_group mark attached to the inode and adds one if not. However
nothing protects another tag_chunk() to add the mark between we've
checked and try to add the fsnotify mark thus resulting in an error from
fsnotify_add_mark() and consequently an ENOSPC error from tag_chunk().
Fix the problem by holding mark_mutex over the whole check-insert code
sequence.
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 'kernel/sys.c')
0 files changed, 0 insertions, 0 deletions