HomeFreeBSD

stand/kmem_zalloc: panic when a M_WAITOK allocation fails

Description

stand/kmem_zalloc: panic when a M_WAITOK allocation fails

Malloc() might return NULL, in which case we will panic with a NULL
pointer deref. Make it panic when the allocation fails to preserve the
postcondtion that we never return a non-NULL value.

Reviewed by: tsoome
PR: 249859
Sponsored by: Netflix
Differential Revision: https://reviews.freebsd.org/D31106

Details

Provenance
impAuthored on Jul 9 2021, 5:21 PM
Reviewer
tsoome
Differential Revision
D31106: stand/kmem_zalloc: panic when a M_WAITOK allocation fails
Parents
rG1472117a1e1c: Support fixed size, variable location acpi resources
Branches
Unknown
Tags
Unknown