]> git.baikalelectronics.ru Git - kernel.git/commit
fsnotify: Protect fsnotify_handle_inode_event from no-inode events
authorGabriel Krisman Bertazi <krisman@collabora.com>
Mon, 25 Oct 2021 19:27:26 +0000 (16:27 -0300)
committerJan Kara <jack@suse.cz>
Wed, 27 Oct 2021 10:34:12 +0000 (12:34 +0200)
commit75a5330c9e862211f12ffa5c7c3e3bec0b4c3691
treeba1f0305c3b3159bb3c8524f8780e19744a35f2e
parentb700942bfa22fd2c7676cf2b6d4dcbe805fbba8b
fsnotify: Protect fsnotify_handle_inode_event from no-inode events

FAN_FS_ERROR allows events without inodes - i.e. for file system-wide
errors.  Even though fsnotify_handle_inode_event is not currently used
by fanotify, this patch protects other backends from cases where neither
inode or dir are provided.  Also document the constraints of the
interface (inode and dir cannot be both NULL).

Link: https://lore.kernel.org/r/20211025192746.66445-12-krisman@collabora.com
Suggested-by: Amir Goldstein <amir73il@gmail.com>
Signed-off-by: Gabriel Krisman Bertazi <krisman@collabora.com>
Reviewed-by: Amir Goldstein <amir73il@gmail.com>
Reviewed-by: Jan Kara <jack@suse.cz>
Signed-off-by: Jan Kara <jack@suse.cz>
fs/nfsd/filecache.c
fs/notify/fsnotify.c
include/linux/fsnotify_backend.h