mirror_zfs/module/os/linux/zfs
Richard Yao 66953686c0 Add assertion and make variables unsigned in abd_alloc_chunks()
Clang's static analyzer pointed out that if alloc_pages >= nr_pages
before the loop, the value of page will be undefined and will be used
anyway. This should not be possible, but as cleanup, we add an
assertion. We also recognize that the local variables should be unsigned
in the first place, so we make them unsigned. This is not enough to
avoid the need for the assertion, since there is still the case that
alloc_pages == nr_pages and nr_pages == 0, which the assertion
implicitly checks.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Brian Atkinson <batkinson@lanl.gov>
Signed-off-by: Richard Yao <richard.yao@alumni.stonybrook.edu>
Closes #14456
2023-02-06 11:10:50 -08:00
..
abd_os.c Add assertion and make variables unsigned in abd_alloc_chunks() 2023-02-06 11:10:50 -08:00
arc_os.c Cleanup: 64-bit kernel module parameters should use fixed width types 2022-10-13 10:03:29 -07:00
mmp_os.c Cleanup: 64-bit kernel module parameters should use fixed width types 2022-10-13 10:03:29 -07:00
policy.c Support idmapped mount in user namespace 2022-11-08 10:28:56 -08: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 Cleanup: 64-bit kernel module parameters should use fixed width types 2022-10-13 10:03:29 -07:00
trace.c Replace dead opensolaris.org license link 2022-07-11 14:16:13 -07:00
vdev_disk.c Cleanup of dead code suggested by Clang Static Analyzer (#14380) 2023-01-17 09:57:12 -08:00
vdev_file.c Cleanup: 64-bit kernel module parameters should use fixed width types 2022-10-13 10:03:29 -07:00
zfs_acl.c Cleanup of dead code suggested by Clang Static Analyzer (#14380) 2023-01-17 09:57:12 -08:00
zfs_ctldir.c Remove zpl_revalidate: fix snapshot rollback 2022-10-28 09:47:19 -07:00
zfs_debug.c Cleanup: Replace oldstyle struct hack with C99 flexible array members 2023-01-12 16:00:03 -08:00
zfs_dir.c Fix unprotected zfs_znode_dmu_fini 2023-01-19 16:59:05 -08:00
zfs_file_os.c Cleanup: Remove branches that always evaluate the same way 2022-11-03 10:47:48 -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 Introduce kmem_scnprintf() 2022-10-29 13:05:11 -07:00
zfs_uio.c Replace dead opensolaris.org license link 2022-07-11 14:16:13 -07:00
zfs_vfsops.c zfs_get_temporary_prop() should not pass NULL to strcpy() 2023-02-06 11:08:57 -08:00
zfs_vnops_os.c Cleanup of dead code suggested by Clang Static Analyzer (#14380) 2023-01-17 09:57:12 -08:00
zfs_znode.c Fix unprotected zfs_znode_dmu_fini 2023-01-19 16:59:05 -08:00
zio_crypt.c Fix GCC 12 compilation errors 2022-11-30 13:45:53 -08:00
zpl_ctldir.c Support idmapped mount in user namespace 2022-11-08 10:28:56 -08:00
zpl_export.c Replace dead opensolaris.org license link 2022-07-11 14:16:13 -07:00
zpl_file.c Support idmapped mount in user namespace 2022-11-08 10:28:56 -08:00
zpl_inode.c linux 6.2 compat: get_acl() got moved to get_inode_acl() in 6.2 2023-01-06 14:40:54 -08:00
zpl_super.c Support idmapped mount 2022-10-19 11:17:09 -07:00
zpl_xattr.c linux 6.2 compat: zpl_set_acl arg2 is now struct dentry 2023-01-24 11:20:50 -08:00
zvol_os.c Optionally skip zil_close during zvol_create_minor_impl 2022-11-08 12:38:08 -08:00