HomeFreeBSD

The recent change to initialization of blists (r324420) relied on '-1'

Description

The recent change to initialization of blists (r324420) relied on '-1'
appearing only where the code explicitly set it, but since much of the
data was not initialized, '-1' appeared other places too, and led to
panics. Clear the allocated data before initializing nonzero values by
allocating with M_ZERO.

Submitted by: Doug Moore <dougm@rice.edu>
Reported by: Oleg V. Nauman <oleg@theweb.org.ua>, cy
Tested by: Oleg V. Nauman <oleg@theweb.org.ua>
MFC after: 1 week
X-MFC with: r324420
Differential Revision: https://reviews.freebsd.org/D12627

Details

Provenance
alcAuthored on
Differential Revision
D12627: clear allocated blist struct
Parents
rS324443: cxgbetool(8): Do not close uninitialized fd on malloc failure.
Branches
Unknown
Tags
Unknown