HomeFreeBSD

Statically allocate first node of zfsdev_state_list

Description

Statically allocate first node of zfsdev_state_list

This avoids a call to kmem_alloc() during module load. It also
suppresses a defect report from Clang's static analyzer that claims that
we will have a NULL pointer dereference in zfsdev_state_init() because
it does not understand that this has already been allocated in
zfs_kmod_init().

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 #14470

Details

Provenance
Richard Yao <richard.yao@alumni.stonybrook.edu>Authored on Feb 7 2023, 8:23 AM
Brian Behlendorf <behlendorf1@llnl.gov>Committed on Mar 1 2023, 1:31 AM
Parents
rG7fc48f8378c6: Suppress static analyzer warning in sa_attr_iter()
Branches
Unknown
Tags
Unknown