linux/fs/notify/inotify
Eric W. Biederman 0db501bd06 inotify: Ensure we alwasy write the terminating NULL.
Before the rewrite copy_event_to_user always wrote a terqminating '\0'
byte to user space after the filename.  Since the rewrite that
terminating byte was skipped if your filename is exactly a multiple of
event_size.  Ouch!

So add one byte to name_size before we round up and use clear_user to
set userspace to zero like /dev/zero does instead of copying the
strange nul_inotify_event.  I can't quite convince myself len_to_zero
will never exceed 16 and even if it doesn't clear_user should be more
efficient and a more accurate reflection of what the code is trying to
do.

Signed-off-by: Eric W. Biederman <ebiederm@aristanetworks.com>
Signed-off-by: Eric Paris <eparis@redhat.com>
2009-08-27 08:02:10 -04:00
..
inotify_fsnotify.c inotify: do not BUG on idr entries at inotify destruction 2009-08-27 08:02:04 -04:00
inotify_user.c inotify: Ensure we alwasy write the terminating NULL. 2009-08-27 08:02:10 -04:00
inotify.c fsnotify: unified filesystem notification backend 2009-06-11 14:57:52 -04:00
inotify.h inotify: inotify_destroy_mark_entry could get called twice 2009-06-19 12:42:48 -04:00
Kconfig fsnotify: use def_bool in kconfig instead of letting the user choose 2009-07-21 15:26:26 -04:00
Makefile inotify: reimplement inotify using fsnotify 2009-06-11 14:57:54 -04:00