freebsd-nq/sys
Konstantin Belousov 948137db10 In UFS_BALLOC(), invalidate pages of indirect buffers on failed block
allocation unwinding.

Dandling buffers are released on UFS_BALLOC() failure to ensure that
later attempt to allocate blocks in close range do not find the blocks
with invalid content, since possible partial block allocations are
unwound.  As such, it is not enough to just release the buffers, the
pages must also invalidated and removed from the vnode vm_object
queue.  Otherwise the pages might be found later and used to
reconstruct indirect buffers when doing allocations at offset close to
the failure point, and their stale content compromise the filesystem
integrity.

Note that just marking the buffer as B_INVAL is not enough, B_NOCACHE
is required.  To be sure, clear the B_CACHE flag as well.  This
complements the r174973, which started releasing buffers.

Reported and tested by:	pho
Reviewed by:	mckusick
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
2016-08-16 17:30:58 +00:00
..
amd64 The pmap_delayed_invl_wait() function blocks on turnstile, it does not 2016-08-11 12:37:11 +00:00
arm Correct the size of the softc in a10_ehci 2016-08-14 13:17:59 +00:00
arm64 Add the ARMv8.1 identification registers to the list we print when booting. 2016-08-15 09:23:08 +00:00
boot Only use WaitForKeys event if it exists, this is not the case in u-boot efi implementation. 2016-08-16 14:33:25 +00:00
bsm
cam cam/da: Add quirk for I-O Data USB Flash Disk 2016-08-11 03:12:56 +00:00
cddl MFV r301526: 2016-08-16 02:25:19 +00:00
compat Eliminate use of sys_fsync() and sys_fdatasync(). 2016-08-15 20:11:52 +00:00
conf Remove the mcd(4) driver for Mitsumi CD-ROM players. 2016-08-15 20:38:02 +00:00
contrib Consistently use device_t 2016-08-09 19:32:06 +00:00
crypto Connect the SHA-512t256 and Skein hashing algorithms to ZFS 2016-05-31 04:12:14 +00:00
ddb In ddb ps, left justify the non-numeric fields 'state' and 'wmesg' and 2016-08-14 15:26:40 +00:00
dev hyperv/hn: Simplify RNDIS message checks on RX path. 2016-08-16 07:45:35 +00:00
fs Implement VOP_FDATASYNC() for msdosfs. 2016-08-15 19:17:00 +00:00
gdb
geom Do not invoke resize event if initial disk size is zero. Some disks 2016-08-01 20:54:54 +00:00
gnu Revert changes for local testing, inadvertantly commited in r300811. 2016-05-26 23:59:42 +00:00
i386 Remove duplicate definition of get_pcb_td(). gcc works for detecting 2016-08-15 10:46:33 +00:00
isa sys/isa: minor spelling fixes. 2016-05-03 21:51:52 +00:00
kern Eliminate use of sys_fsync() and sys_fdatasync(). 2016-08-15 20:11:52 +00:00
kgssapi kgssapi: insignificant spelling fix. 2016-05-03 22:05:03 +00:00
libkern sys: Make use of our rounddown() macro when sys/param.h is available. 2016-04-30 14:41:18 +00:00
mips [mips] fix use-before-initialised. 2016-08-16 07:51:05 +00:00
modules Remove the mcd(4) driver for Mitsumi CD-ROM players. 2016-08-15 20:38:02 +00:00
net Update iflib to support more NIC designs 2016-08-12 21:29:44 +00:00
net80211 sys: replace comma with semicolon when pertinent. 2016-08-09 19:42:20 +00:00
netgraph Avoid panic from ng_uncallout when unpluggin ethernet cable with active 2016-08-08 19:31:01 +00:00
netinet A few more wording tweaks as suggested (with some modifications 2016-08-16 15:17:36 +00:00
netinet6 Add ipfw_nat64 module that implements stateless and stateful NAT64. 2016-08-13 16:09:49 +00:00
netipsec Get closer to a VIMAGE network stack teardown from top to bottom rather 2016-06-21 13:48:49 +00:00
netnatm kernel: use our nitems() macro when it is available through param.h. 2016-04-19 23:48:27 +00:00
netpfil Fix command: ipfw set (enable|disable) N (where N > 4). 2016-08-15 13:06:29 +00:00
netsmb sys/net*: minor spelling fixes. 2016-05-03 18:05:43 +00:00
nfs Hide the boottime and bootimebin globals, provide the getboottime(9) 2016-07-27 11:08:59 +00:00
nfsclient
nfsserver
nlm When sleeping waiting for either local or remote advisory lock, 2016-06-26 20:08:42 +00:00
ofed mthca: Add a wrapper for the firmware's DIAG_RPRT command. 2016-08-05 21:34:09 +00:00
opencrypto opencrypto AES-ICM: Fix heap corruption typo 2016-08-01 22:57:03 +00:00
pc98 Move 'device pci' for the PCI bus driver to the MI NOTES file. 2016-04-29 23:53:55 +00:00
powerpc Return 0 instead of an error code on failure to find dcsr. 2016-08-14 04:11:36 +00:00
riscv o Remove operation in machine mode. 2016-08-10 12:41:36 +00:00
rpc Hide the boottime and bootimebin globals, provide the getboottime(9) 2016-07-27 11:08:59 +00:00
security Add AUE_WAIT6 handling to the BSM conversion switch statement, reusing 2016-07-11 13:06:17 +00:00
sparc64 sys: replace comma with semicolon when pertinent. 2016-08-09 19:42:20 +00:00
sys Add two new macros, SLIST_CONCAT and LIST_CONCAT. Note in both the 2016-08-16 17:07:48 +00:00
teken
tests
tools Consider CROSS_BINUTILS_PREFIX environment variable so we use correct 2016-08-10 13:49:17 +00:00
ufs In UFS_BALLOC(), invalidate pages of indirect buffers on failed block 2016-08-16 17:30:58 +00:00
vm Eliminate unneeded vm_page_xbusy() and vm_page_xunbusy() operations when 2016-08-14 22:00:45 +00:00
x86 sys: replace comma with semicolon when pertinent. 2016-08-09 19:42:20 +00:00
xdr
xen xen: Correct typo in #undef for symbol NBPL 2016-06-06 14:55:46 +00:00
Makefile