diff options
author | Eric W. Biederman <ebiederm@xmission.com> | 2009-08-27 10:20:04 (GMT) |
---|---|---|
committer | Eric Paris <eparis@redhat.com> | 2009-08-27 12:02:10 (GMT) |
commit | 0db501bd0610ee0c0aca84d927f90bcccd09e2bd (patch) | |
tree | 108756b2460edff75bb7bc6c778e1a2c0ff50167 /Documentation/lockstat.txt | |
parent | dead537dd8a1c9495322c1d6f7c780697f474af0 (diff) | |
download | linux-0db501bd0610ee0c0aca84d927f90bcccd09e2bd.tar.xz |
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>
Diffstat (limited to 'Documentation/lockstat.txt')
0 files changed, 0 insertions, 0 deletions