]> git.baikalelectronics.ru Git - kernel.git/commit
inotify: Fix reporting of cookies for inotify events
authorJan Kara <jack@suse.cz>
Mon, 17 Feb 2014 12:09:50 +0000 (13:09 +0100)
committerJan Kara <jack@suse.cz>
Tue, 18 Feb 2014 10:17:17 +0000 (11:17 +0100)
commitbb6fc7b0141c6f9512c9fba3db49ab1cc6019394
treeb1f71eb3ff7209849bd27b0dbb131ea74bd7f63b
parentaf18dbdc538d68661a2dc170065e02fb49a2ec53
inotify: Fix reporting of cookies for inotify events

My rework of handling of notification events (namely commit af263ed20e4f
"fsnotify: do not share events between notification groups") broke
sending of cookies with inotify events. We didn't propagate the value
passed to fsnotify() properly and passed 4 uninitialized bytes to
userspace instead (so it is also an information leak). Sadly I didn't
notice this during my testing because inotify cookies aren't used very
much and LTP inotify tests ignore them.

Fix the problem by passing the cookie value properly.

Fixes: af263ed20e4fbe8a06856a99dc0fb2891b18af74
Reported-by: Vegard Nossum <vegard.nossum@oracle.com>
Signed-off-by: Jan Kara <jack@suse.cz>
fs/notify/dnotify/dnotify.c
fs/notify/fanotify/fanotify.c
fs/notify/fsnotify.c
fs/notify/inotify/inotify.h
fs/notify/inotify/inotify_fsnotify.c
fs/notify/inotify/inotify_user.c
include/linux/fsnotify_backend.h
kernel/audit_tree.c
kernel/audit_watch.c