android_kernel_motorola_sm6375/fs/notify
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Jan Kara 8fb33166ae inotify: Avoid reporting event with invalid wd
commit c915d8f5918bea7c3962b09b8884ca128bfd9b0c upstream.

When inotify_freeing_mark() races with inotify_handle_inode_event() it
can happen that inotify_handle_inode_event() sees that i_mark->wd got
already reset to -1 and reports this value to userspace which can
confuse the inotify listener. Avoid the problem by validating that wd is
sensible (and pretend the mark got removed before the event got
generated otherwise).

CC: [email protected]
Fixes: 7e790dd5fc ("inotify: fix error paths in inotify_update_watch")
Message-Id: <[email protected]>
Reported-by: [email protected]
Reviewed-by: Amir Goldstein <[email protected]>
Signed-off-by: Jan Kara <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
2023-05-17 11:36:01 +02:00
..
dnotify
fanotify
inotify inotify: Avoid reporting event with invalid wd 2023-05-17 11:36:01 +02:00
fdinfo.c
fdinfo.h
fsnotify.c
fsnotify.h
group.c
Kconfig
Makefile
mark.c
notification.c