Filesystem implementations depend on vattr_null() to initialize the
fields in struct vattr, which is true for all the fields except
va_filerev. It therefore is not set to VNOVAL as expected by the file
system, but contains whatever was there on the stack. This causes
VOP_GETATTR() on cd9660 and msdosfs vnodes to yield garbage for
va_filerev.
Index: vfs_subr.c
===================================================================
RCS file: /cvs/src/sys/kern/vfs_subr.c,v
retrieving revision 1.235
diff -u -r1.235 vfs_subr.c
--- vfs_subr.c 8 Oct 2015 08:41:58 -0000 1.235
+++ vfs_subr.c 8 Oct 2015 19:33:44 -0000
@@ -305,7 +305,7 @@
vap->va_atime.tv_sec = vap->va_atime.tv_nsec =
vap->va_mtime.tv_sec = vap->va_mtime.tv_nsec =
vap->va_ctime.tv_sec = vap->va_ctime.tv_nsec =
- vap->va_flags = vap->va_gen = VNOVAL;
+ vap->va_flags = vap->va_gen = vap->va_filerev = VNOVAL;
vap->va_vaflags = 0;
}
cheers,
natano