mirror_zfs/module/os/freebsd/zfs
Richard Yao a6ccb36b94
Add defensive assertions
Coverity complains about possible bugs involving referencing NULL return
values and division by zero. The division by zero bugs require that a
block pointer be corrupt, either from in-memory corruption, or on-disk
corruption. The NULL return value complaints are only bugs if
assumptions that we make about the state of data structures are wrong.
Some seem impossible to be wrong and thus are false positives, while
others are hard to analyze.

Rather than dismiss these as false positives by assuming we know better,
we add defensive assertions to let us know when our assumptions are
wrong.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Richard Yao <richard.yao@alumni.stonybrook.edu>
Closes #13972
2022-10-12 11:25:18 -07:00
..
abd_os.c FreeBSD: use zero_region instead of allocating a dedicated page 2022-05-04 11:46:37 -07:00
arc_os.c Cleanup: Specify unsignedness on things that should not be signed 2022-09-27 16:42:41 -07:00
crypto_os.c FreeBSD: Improve crypto_dispatch() handling 2022-06-17 15:38:51 -07:00
dmu_os.c Remove bcopy(), bzero(), bcmp() 2022-03-15 15:13:42 -07:00
event_os.c FreeBSD: add knlist_init_sx() for exclusive locks 2022-09-06 09:48:57 -07:00
hkdf.c Remove bcopy(), bzero(), bcmp() 2022-03-15 15:13:42 -07:00
kmod_core.c FreeBSD: Replace legacy make_dev() interface usage 2022-09-08 10:40:18 -07:00
spa_os.c FreeBSD: Fix uninitialized pointer read in spa_import_rootpool() 2022-09-20 14:43:03 -07:00
sysctl_os.c Cleanup: Specify unsignedness on things that should not be signed 2022-09-27 16:42:41 -07:00
vdev_file.c Replace dead opensolaris.org license link 2022-07-11 14:16:13 -07:00
vdev_geom.c Improve too large physical ashift handling 2022-09-08 10:30:53 -07:00
vdev_label_os.c Replace dead opensolaris.org license link 2022-07-11 14:16:13 -07:00
zfs_acl.c Add defensive assertions 2022-10-12 11:25:18 -07:00
zfs_ctldir.c FreeBSD: stop passing LK_INTERLOCK to VOP_LOCK 2022-09-19 17:17:27 -07:00
zfs_debug.c Cleanup: Specify unsignedness on things that should not be signed 2022-09-27 16:42:41 -07:00
zfs_dir.c FreeBSD: Cleanup zfs_readdir() 2022-09-20 14:50:16 -07:00
zfs_file_os.c FreeBSD: handle V_PCATCH 2022-09-20 15:22:32 -07:00
zfs_ioctl_compat.c FreeBSD compile fix 2022-07-28 14:19:41 -07:00
zfs_ioctl_os.c libzfs: On FreeBSD, use MNT_NOWAIT with getfsstat 2021-06-08 07:36:43 -06:00
zfs_racct.c module: zfs: fix unused, remove argsused 2021-12-23 09:42:47 -08:00
zfs_vfsops.c FreeBSD: Fix a pair of bugs in zfs_fhtovp() 2022-10-11 12:29:55 -07:00
zfs_vnops_os.c FreeBSD: catch up to 1400068 2022-09-20 15:21:30 -07:00
zfs_znode.c Replace dead opensolaris.org license link 2022-07-11 14:16:13 -07:00
zio_crypt.c Remove bcopy(), bzero(), bcmp() 2022-03-15 15:13:42 -07:00
zvol_os.c FreeBSD: add kqfilter support for zvol cdev 2022-09-06 09:49:33 -07:00