mirror_zfs/module/os/linux/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 Replace dead opensolaris.org license link 2022-07-11 14:16:13 -07:00
arc_os.c Cleanup: Specify unsignedness on things that should not be signed 2022-09-27 16:42:41 -07:00
mmp_os.c Replace dead opensolaris.org license link 2022-07-11 14:16:13 -07:00
policy.c Replace dead opensolaris.org license link 2022-07-11 14:16:13 -07:00
qat_compress.c Replace dead opensolaris.org license link 2022-07-11 14:16:13 -07:00
qat_crypt.c Replace dead opensolaris.org license link 2022-07-11 14:16:13 -07:00
qat.c Replace dead opensolaris.org license link 2022-07-11 14:16:13 -07:00
spa_misc_os.c Replace dead opensolaris.org license link 2022-07-11 14:16:13 -07:00
trace.c Replace dead opensolaris.org license link 2022-07-11 14:16:13 -07:00
vdev_disk.c zed: mark disks as REMOVED when they are removed 2022-09-28 09:48:46 -07:00
vdev_file.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 zfs_enter rework 2022-09-16 13:36:47 -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 Replace dead opensolaris.org license link 2022-07-11 14:16:13 -07:00
zfs_file_os.c Replace dead opensolaris.org license link 2022-07-11 14:16:13 -07:00
zfs_ioctl_os.c Replace dead opensolaris.org license link 2022-07-11 14:16:13 -07:00
zfs_racct.c module: zfs: fix unused, remove argsused 2021-12-23 09:42:47 -08:00
zfs_sysfs.c Replace dead opensolaris.org license link 2022-07-11 14:16:13 -07:00
zfs_uio.c Replace dead opensolaris.org license link 2022-07-11 14:16:13 -07:00
zfs_vfsops.c Linux: Fix use-after-free in zfsvfs_create() 2022-09-19 17:30:58 -07:00
zfs_vnops_os.c zfs_enter rework 2022-09-16 13:36:47 -07:00
zfs_znode.c Replace dead opensolaris.org license link 2022-07-11 14:16:13 -07:00
zio_crypt.c Avoid calling rw_destroy() on uninitialized rwlock 2022-10-05 17:07:50 -07:00
zpl_ctldir.c Fix double const qualifier declarations 2022-09-30 15:34:39 -07:00
zpl_export.c Replace dead opensolaris.org license link 2022-07-11 14:16:13 -07:00
zpl_file.c zfs_enter rework followup 2022-09-16 14:25:53 -07:00
zpl_inode.c Replace dead opensolaris.org license link 2022-07-11 14:16:13 -07:00
zpl_super.c zfs_enter rework 2022-09-16 13:36:47 -07:00
zpl_xattr.c zfs_enter rework 2022-09-16 13:36:47 -07:00
zvol_os.c Cleanup: Remove ineffective unsigned comparisons against 0 2022-09-26 17:02:38 -07:00