diff options
author | Jan Kara <jack@suse.cz> | 2016-10-07 16:56:58 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2016-10-07 18:46:26 -0700 |
commit | 0b1b86527df4b1f398266c23e926dd788925bb69 (patch) | |
tree | 04d4ba30ad9e2e17a9e68b344964fe06bcfcfd88 /fs/notify/fanotify | |
parent | 073f65522aeb23e46fc8a809d69513132d3acc81 (diff) | |
download | linux-0b1b86527df4b1f398266c23e926dd788925bb69.tar.gz linux-0b1b86527df4b1f398266c23e926dd788925bb69.tar.bz2 linux-0b1b86527df4b1f398266c23e926dd788925bb69.zip |
fanotify: fix possible false warning when freeing events
When freeing permission events by fsnotify_destroy_event(), the warning
WARN_ON(!list_empty(&event->list)); may falsely hit.
This is because although fanotify_get_response() saw event->response
set, there is nothing to make sure the current CPU also sees the removal
of the event from the list. Add proper locking around the WARN_ON() to
avoid the false warning.
Link: http://lkml.kernel.org/r/1473797711-14111-7-git-send-email-jack@suse.cz
Reported-by: Miklos Szeredi <mszeredi@redhat.com>
Signed-off-by: Jan Kara <jack@suse.cz>
Reviewed-by: Lino Sanfilippo <LinoSanfilippo@gmx.de>
Cc: Eric Paris <eparis@redhat.com>
Cc: Al Viro <viro@ZenIV.linux.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/notify/fanotify')
0 files changed, 0 insertions, 0 deletions