]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Suppress Clang Static Analyzer defect report in abd_get_size()
authorRichard Yao <richard.yao@alumni.stonybrook.edu>
Tue, 7 Feb 2023 23:47:40 +0000 (18:47 -0500)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Wed, 8 Mar 2023 21:51:09 +0000 (13:51 -0800)
commit8b72dfed11d0070c55361408bff9d60d873e437f
tree20c87b784755e57ce74665ccbeae784019ee0719
parent9368b3877c06061a602cb6638ee64f173e9b90d3
Suppress Clang Static Analyzer defect report in abd_get_size()

Clang's static analyzer reports a possible NULL pointer dereference in
abd_get_size() when called from vdev_draid_map_alloc_write() called from
vdev_draid_map_alloc_row() and vdc->vdc_nparity == 0. This should be
impossible, so we add an assertion to silence the defect report.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Richard Yao <richard.yao@alumni.stonybrook.edu>
Closes #14575
module/zfs/vdev_draid.c