]> git.baikalelectronics.ru Git - kernel.git/commit
fsnotify: Do not return merged event from fsnotify_add_notify_event()
authorJan Kara <jack@suse.cz>
Tue, 28 Jan 2014 17:53:22 +0000 (18:53 +0100)
committerJan Kara <jack@suse.cz>
Wed, 29 Jan 2014 12:57:10 +0000 (13:57 +0100)
commit1b84db975b98875ada1f345f100b7839c661c394
treeb29a85223f2e5e166f075266edb1bf2e0ef5cf57
parent135cc06473c95dd02e6520e059f0b9b422f96755
fsnotify: Do not return merged event from fsnotify_add_notify_event()

The event returned from fsnotify_add_notify_event() cannot ever be used
safely as the event may be freed by the time the function returns (after
dropping notification_mutex). So change the prototype to just return
whether the event was added or merged into some existing event.

Reported-and-tested-by: Jiri Kosina <jkosina@suse.cz>
Reported-and-tested-by: Dave Jones <davej@fedoraproject.org>
Signed-off-by: Jan Kara <jack@suse.cz>
fs/notify/fanotify/fanotify.c
fs/notify/inotify/inotify_fsnotify.c
fs/notify/notification.c
include/linux/fsnotify_backend.h