WSL2-Linux-Kernel/fs/notify/dnotify
Jan Kara 3587188ad5 dnotify: Handle errors from fsnotify_add_mark_locked() in fcntl_dirnotify()
commit b3a0066005 upstream.

fsnotify_add_mark_locked() can fail but we do not check its return
value. This didn't matter before commit 9dd813c15b "fsnotify: Move
mark list head from object into dedicated structure" as none of possible
failures could happen for dnotify but after that commit -ENOMEM can be
returned. Handle this error properly in fcntl_dirnotify() as
otherwise we just hit BUG_ON(dn_mark->dn) in dnotify_free_mark().

Reviewed-by: Amir Goldstein <amir73il@gmail.com>
Reported-by: syzkaller
Fixes: 9dd813c15b
Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-02-25 11:07:47 +01:00
..
Kconfig fsnotify: use def_bool in kconfig instead of letting the user choose 2009-07-21 15:26:26 -04:00
Makefile filesystem notification: create fs/notify to contain all fs notification 2008-12-31 18:07:43 -05:00
dnotify.c dnotify: Handle errors from fsnotify_add_mark_locked() in fcntl_dirnotify() 2018-02-25 11:07:47 +01:00