mirror_zfs/include/sys
Jan Engelhardt aca19e063b Do not attempt access beyond the declared end of the dn_blkptr array
This loop in dmu_objset_write_ready():

	for (i = 0; i < dnp->dn_nblkptr; i++)
		bp->blk_fill += dnp->dn_blkptr[i].blk_fill;

invokes _undefined behavior_ for the (common) case of dn_nblkptr=3,
therefore, the compiler is free to do whatever it wants (such as
optimizing it away, or otherwise messing up your expections).

The fix is to be honest about the array size.

Signed-off-by: Tim Chase <tim@chase2k.com>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #2511
Closes #2010
2014-07-22 09:55:37 -07:00
..
fm
fs
arc.h Split "data_size" into "meta" and "data" 2014-02-21 16:10:49 -08:00
avl_impl.h
avl.h Support custom build directories and move includes 2010-09-08 12:38:56 -07:00
bplist.h
bpobj.h
bptree.h
dbuf.h Illumos #4045 write throttle & i/o scheduler performance work 2013-12-06 09:32:43 -08:00
ddt.h Add ddt, ddt_entry, and l2arc_hdr caches 2014-01-07 10:33:11 -08:00
dmu_impl.h
dmu_objset.h
dmu_send.h
dmu_traverse.h
dmu_tx.h
dmu_zfetch.h
dmu.h Illumos #4045 write throttle & i/o scheduler performance work 2013-12-06 09:32:43 -08:00
dnode.h
dsl_dataset.h
dsl_deadlist.h
dsl_deleg.h
dsl_destroy.h
dsl_dir.h
dsl_pool.h
dsl_prop.h
dsl_scan.h
dsl_synctask.h
dsl_userhold.h
efi_partition.h
Makefile.am
metaslab_impl.h
metaslab.h
nvpair_impl.h
nvpair.h
range_tree.h
refcount.h
rrwlock.h
sa_impl.h
sa.h
spa_boot.h
spa_impl.h
spa.h replace nreserved with ndirty in txgs kstat 2014-03-04 12:22:24 -08:00
space_map.h
space_reftree.h
txg_impl.h
txg.h Illumos #4045 write throttle & i/o scheduler performance work 2013-12-06 09:32:43 -08:00
u8_textprep_data.h
u8_textprep.h
uberblock_impl.h
uberblock.h
uio_impl.h
unique.h
uuid.h Support custom build directories and move includes 2010-09-08 12:38:56 -07:00
vdev_disk.h
vdev_file.h
vdev_impl.h
vdev.h 3246 ZFS I/O deadman thread 2013-05-01 17:05:52 -07:00
xvattr.h
zap_impl.h
zap_leaf.h
zap.h Illumos #3742 2013-11-04 10:55:25 -08:00
zfeature.h
zfs_acl.h
zfs_context.h
zfs_ctldir.h
zfs_debug.h
zfs_delay.h
zfs_dir.h
zfs_fuid.h
zfs_ioctl.h
zfs_onexit.h
zfs_rlock.h
zfs_sa.h
zfs_stat.h
zfs_vfsops.h
zfs_vnops.h
zfs_znode.h
zil_impl.h
zil.h cstyle: Resolve C style issues 2013-12-18 16:46:35 -08:00
zio_checksum.h
zio_compress.h
zio_impl.h
zio.h Revert changes to zbookmark_t 2014-02-21 12:10:39 -08:00
zpl.h cstyle: Resolve C style issues 2013-12-18 16:46:35 -08:00
zrlock.h
zvol.h Remove ZFC_IOC_*_MINOR ioctl()s 2013-12-16 09:15:57 -08:00