HomeFreeBSD

Fix zfsd with the device_removal pool feature.

Description

Fix zfsd with the device_removal pool feature.

Previously zfsd would crash in the presence of a pool with a
top-level-vdev that had previously been removed. The crash happened
because the configuration nvlist of such a TLV contains an empty
ZPOOL_CONFIG_CHILDREN array, which led to a pop_front from an empty
list, which has undefined behavior.

The crash only happened in stable/14 and later, probably do to
differences in libcxx, but the change should be MFCed anyway.

PR: 273663
Reported by: Marek Zarychta <zarychtam@plan-b.pwste.edu.pl>
MFC after: 1 week
Sponsored by: Axcient
Reviewed by: mav
Differential Revision: https://reviews.freebsd.org/D41818

Details

Provenance
asomersAuthored on Sep 12 2023, 1:20 AM
Reviewer
mav
Differential Revision
D41818: Fix zfsd with the device_removal pool feature.
Parents
rGff9c4abd9fea: sysctl(9): Fix typo translatation -> translation
Branches
Unknown
Tags
Unknown