8d013bec7a
This bug was long present, but was exacerbated by r345876. The problem is that fiov_refresh was bzero()ing a buffer _before_ it reallocated that buffer. That's obviously the wrong order. I fixed the order in r345876, which exposed the main problem. Previously, the first 160 bytes of the buffer were getting bzero()ed when it was first allocated in fiov_init. Subsequently, as that buffer got recycled between callers, the portion used by the _previous_ caller was getting bzero()ed by the current caller in fiov_refresh. The problem was never visible simply because no caller was trying to use more than 160 bytes. Now the buffer gets properly bzero()ed both at initialization time and any time it gets enlarged or reallocated. Sponsored by: The FreeBSD Foundation