freebsd-nq/sys/fs/msdosfs
Konstantin Belousov c973ee9e06 msdosfs: zero tail of the last block on truncation for VREG vnodes as well.
Despite the call to vtruncbuf() from detrunc(), which results in
zeroing part of the partial page after EOF, there still is a
possibility to retain the stale data which is revived on file
enlargement.  If the filesystem block size is greater than the page
size, partial block might keep other after-EOF pages wired and they
get reused then.  Fix it by zeroing whole part of the partial buffer
after EOF, not relying on vnode_pager_setsize().

PR:	236977
Reported by:	asomers
Tested by:	pho
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
2019-04-03 17:02:18 +00:00
..
bootsect.h msdosfs: use C99 types 2017-05-19 18:13:41 +00:00
bpb.h msdosfs: use C99 types 2017-05-19 18:13:41 +00:00
denode.h msdosfs: use same max filesize #define as NetBSD and move to header 2018-07-30 20:36:51 +00:00
direntry.h Revert msdosfs MAKEFS #ifdef changes from r319870 2018-07-24 21:10:17 +00:00
fat.h Revert msdosfs MAKEFS #ifdef changes from r319870 2018-07-24 21:10:17 +00:00
msdosfs_conv.c msdosfs: trim EOL whitespace 2018-07-31 12:44:28 +00:00
msdosfs_denode.c msdosfs: zero tail of the last block on truncation for VREG vnodes as well. 2019-04-03 17:02:18 +00:00
msdosfs_fat.c msdosfs: fixes for Undefined Behavior. 2018-08-08 15:08:22 +00:00
msdosfs_iconv.c sys/fs: further adoption of SPDX licensing ID tags. 2017-11-27 15:15:37 +00:00
msdosfs_lookup.c msdosfs: trim EOL whitespace 2018-07-31 12:44:28 +00:00
msdosfs_vfsops.c Quick fix for initialization of mnt_iosize_max. (This limit controls 2018-12-21 20:12:43 +00:00
msdosfs_vnops.c Fix clobbering of the fatchain cache for clustered i/o's when full 2018-12-21 21:17:45 +00:00
msdosfsmount.h sys/fs: further adoption of SPDX licensing ID tags. 2017-11-27 15:15:37 +00:00