From owner-svn-src-head@FreeBSD.ORG Wed Apr 29 22:00:27 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 55C9437B; Wed, 29 Apr 2015 22:00:27 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 447FF1D0A; Wed, 29 Apr 2015 22:00:27 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3TM0Rjm062089; Wed, 29 Apr 2015 22:00:27 GMT (envelope-from oshogbo@FreeBSD.org) Received: (from oshogbo@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3TM0R2J062088; Wed, 29 Apr 2015 22:00:27 GMT (envelope-from oshogbo@FreeBSD.org) Message-Id: <201504292200.t3TM0R2J062088@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: oshogbo set sender to oshogbo@FreeBSD.org using -f From: Mariusz Zaborski Date: Wed, 29 Apr 2015 22:00:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282250 - head/sys/sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 29 Apr 2015 22:00:27 -0000 Author: oshogbo Date: Wed Apr 29 22:00:26 2015 New Revision: 282250 URL: https://svnweb.freebsd.org/changeset/base/282250 Log: Nvlist functionality is not used within interrupt context, so we should use M_WAITOK to allocate memory. Approved by: pjd (mentor) Modified: head/sys/sys/nv_impl.h Modified: head/sys/sys/nv_impl.h ============================================================================== --- head/sys/sys/nv_impl.h Wed Apr 29 21:54:34 2015 (r282249) +++ head/sys/sys/nv_impl.h Wed Apr 29 22:00:26 2015 (r282250) @@ -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__)