HomeFreeBSD

libnv: Allow use in non-sleepable contexts

Description

libnv: Allow use in non-sleepable contexts

44c125c4cebc2fd87c6260b90eddae11201f5232 switched the nvlist allocations
to be M_WAITOK, but this precludes the use in non-sleepable contexts.
(E.g. with a nonsleepable lock held).

All callers for these allocation functions already cope with memory
alloation failures, so there's no reason to allow sleeping during
allocations.

Reviewed by: melifaro, oshogbo
MFC after: 1 week
Sponsored by: Rubicon Communications, LLC ("Netgate")
Differential Revision: https://reviews.freebsd.org/D29556

Details

Provenance
kpAuthored on Mar 25 2021, 12:59 PM
Reviewer
melifaro
Differential Revision
D29556: libnv: Allow use in non-sleepable contexts
Parents
rG5a5623397c73: pf tests: make synproxy and nat work correctly even if inetd is running
Branches
Unknown
Tags
Unknown