mirror_zfs/module
Richard Yao 399bb81607 Suppress Clang Static Analyzer warning in vdev_split()
Clang's static analyzer pointed out that we can have a NULL pointer
dereference if we ever attempt to split a vdev that has only 1 child. If
that happens, we are left with zero children, but then try to access a
non-existent child. Calling vdev_split() on a vdev with only 1 child
should be impossible due to how the code is structured. If this ever
happens, it would be best to stop execution immediately even in a
production environment to allow for the best possible chance of recovery
by an expert, so we use `VERIFY3U()` instead of `ASSERT3U()`.

Unfortunately, while that defensive assertion will prevent execution
from ever reaching the NULL pointer dereference, Clang's static analyzer
does not realize that, so we add an `ASSERT()` to inform it of this.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Richard Yao <richard.yao@alumni.stonybrook.edu>
Closes #14575
2023-03-08 13:51:31 -08:00
..
avl Suppress Clang Static Analyzer false positive in the AVL tree code. 2023-03-08 13:51:21 -08:00
icp ICP: AES-GCM: Unify gcm_init_ctx() and gmac_init_ctx() 2023-03-08 11:12:15 -08:00
lua x86 asm: Replace .align with .balign 2023-01-24 09:04:39 -08:00
nvpair Replace dead opensolaris.org license link 2022-07-11 14:16:13 -07:00
os More adaptive ARC eviction 2023-03-08 11:17:23 -08:00
unicode Illumos #15286: do_composition() needs sign awareness 2023-01-05 11:16:21 -08:00
zcommon Configure zed's diagnosis engine with vdev properties 2023-01-23 13:14:25 -08:00
zfs Suppress Clang Static Analyzer warning in vdev_split() 2023-03-08 13:51:31 -08:00
zstd Resolve WS-2021-0184 vulnerability in zstd 2023-02-02 15:12:51 -08:00
.gitignore FreeBSD: Ignore symlink to i386 includes 2022-08-02 16:34:23 -07:00
Kbuild.in Add generic implementation handling and SHA2 impl 2023-03-02 13:52:21 -08:00
Makefile.bsd Add generic implementation handling and SHA2 impl 2023-03-02 13:52:21 -08:00
Makefile.in autoconf: use include directives instead of recursing down lib 2022-05-10 10:18:11 -07:00