Nvlist functionality is not used within interrupt context, so we should
use M_WAITOK to allocate memory. Approved by: pjd (mentor)
This commit is contained in:
parent
003e3ea15b
commit
44c125c4ce
@ -47,11 +47,11 @@ typedef struct nvpair nvpair_t;
|
||||
#define NV_FLAG_BIG_ENDIAN 0x80
|
||||
|
||||
#ifdef _KERNEL
|
||||
#define nv_malloc(size) malloc((size), M_NVLIST, M_NOWAIT)
|
||||
#define nv_malloc(size) malloc((size), M_NVLIST, M_WAITOK)
|
||||
#define nv_calloc(n, size) malloc((n) * (size), M_NVLIST, \
|
||||
M_NOWAIT | M_ZERO)
|
||||
M_WAITOK | M_ZERO)
|
||||
#define nv_realloc(buf, size) realloc((buf), (size), M_NVLIST, \
|
||||
M_NOWAIT)
|
||||
M_WAITOK)
|
||||
#define nv_free(buf) free((buf), M_NVLIST)
|
||||
#define nv_strdup(buf) strdup((buf), M_NVLIST)
|
||||
#define nv_vasprintf(ptr, ...) vasprintf(ptr, M_NVLIST, __VA_ARGS__)
|
||||
|
Loading…
Reference in New Issue
Block a user