svn commit: r293083 - user/ngie/stable-10-libnv/sys/sys

Garrett Cooper ngie at FreeBSD.org
Sun Jan 3 07:43:08 UTC 2016


Author: ngie
Date: Sun Jan  3 07:43:07 2016
New Revision: 293083
URL: https://svnweb.freebsd.org/changeset/base/293083

Log:
  MFC r282250:
  r282250 (by oshogbo):
  
  Nvlist functionality is not used within interrupt context, so we should
  use M_WAITOK to allocate memory.

Modified:
  user/ngie/stable-10-libnv/sys/sys/nv_impl.h
Directory Properties:
  user/ngie/stable-10-libnv/   (props changed)

Modified: user/ngie/stable-10-libnv/sys/sys/nv_impl.h
==============================================================================
--- user/ngie/stable-10-libnv/sys/sys/nv_impl.h	Sun Jan  3 07:40:11 2016	(r293082)
+++ user/ngie/stable-10-libnv/sys/sys/nv_impl.h	Sun Jan  3 07:43:07 2016	(r293083)
@@ -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__)


More information about the svn-src-user mailing list