linux-stable/fs/notify
Jan Kara b3a0066005 dnotify: Handle errors from fsnotify_add_mark_locked() in fcntl_dirnotify()
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>
2017-10-31 17:41:04 +01:00
..
dnotify dnotify: Handle errors from fsnotify_add_mark_locked() in fcntl_dirnotify() 2017-10-31 17:41:04 +01:00
fanotify fanotify: don't expose EOPENSTALE to userspace 2017-04-25 15:48:06 +02:00
inotify fsnotify: Move ->free_mark callback to fsnotify_ops 2017-04-10 17:37:36 +02:00
fdinfo.c fsnotify: Move object pointer to fsnotify_mark_connector 2017-04-10 17:37:35 +02:00
fdinfo.h fs: Convert show_fdinfo functions to void 2014-11-05 14:13:23 -05:00
fsnotify.c dentry name snapshots 2017-07-07 20:09:10 -04:00
fsnotify.h fsnotify: Remove fsnotify_find_{inode|vfsmount}_mark() 2017-04-10 17:37:36 +02:00
group.c fsnotify: Remove fsnotify_detach_group_marks() 2017-04-10 17:37:36 +02:00
Kconfig rcu: Make SRCU optional by using CONFIG_SRCU 2015-01-06 11:04:29 -08:00
Makefile fsnotify: Drop inode_mark.c 2017-04-10 17:37:36 +02:00
mark.c fsnotify: remove a stray unlock 2017-04-24 16:41:28 +02:00
notification.c fsnotify: clean up spinlock assertions 2016-10-07 18:46:26 -07:00