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

(cherry picked from commit 72821668b039c276914569e9caa1cdfa4e4cb674)

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
R10:940fae408255: nanobsd: remove sparc64 embedded example
Branches
Unknown
Tags
Unknown