svn commit: r221003 - stable/8/sys/netgraph

Andrey V. Elsukov ae at FreeBSD.org
Mon Apr 25 04:33:14 UTC 2011


Author: ae
Date: Mon Apr 25 04:33:13 2011
New Revision: 221003
URL: http://svn.freebsd.org/changeset/base/221003

Log:
  MFC r220767:
    Use M_WAITOK flag instead M_WAIT for malloc.
  
    Suggested by:	glebius

Modified:
  stable/8/sys/netgraph/ng_patch.c
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)

Modified: stable/8/sys/netgraph/ng_patch.c
==============================================================================
--- stable/8/sys/netgraph/ng_patch.c	Sun Apr 24 23:04:08 2011	(r221002)
+++ stable/8/sys/netgraph/ng_patch.c	Mon Apr 25 04:33:13 2011	(r221003)
@@ -165,7 +165,7 @@ ng_patch_constructor(node_p node)
 {
 	priv_p privdata;
 
-	privdata = malloc(sizeof(*privdata), M_NETGRAPH, M_WAIT | M_ZERO);
+	privdata = malloc(sizeof(*privdata), M_NETGRAPH, M_WAITOK | M_ZERO);
 	NG_NODE_SET_PRIVATE(node, privdata);
 	privdata->in = NULL;
 	privdata->out = NULL;
@@ -208,7 +208,8 @@ ng_patch_rcvmsg(node_p node, item_p item
 			if (privp->config == NULL)
 				break;
 			NG_MKRESPONSE(resp, msg,
-			    NG_PATCH_CONF_SIZE(privp->config->count), M_WAIT);
+			    NG_PATCH_CONF_SIZE(privp->config->count),
+			    M_WAITOK);
 			bcopy(privp->config, resp->data,
 			    NG_PATCH_CONF_SIZE(privp->config->count));
 			break;
@@ -248,10 +249,10 @@ ng_patch_rcvmsg(node_p node, item_p item
 			if (error == 0) {
 				newconf = malloc(
 				    NG_PATCH_CONF_SIZE(conf->count),
-				    M_NETGRAPH, M_WAIT);
+				    M_NETGRAPH, M_WAITOK);
 				newval = malloc(conf->count *
 				    sizeof(union patch_val), M_NETGRAPH,
-				    M_WAIT);
+				    M_WAITOK);
 				for(i = 0; i < conf->count; i++) {
 					switch (conf->ops[i].length) {
 					case 1:
@@ -288,7 +289,7 @@ ng_patch_rcvmsg(node_p node, item_p item
 			/* FALLTHROUGH */
 		case NGM_PATCH_GET_STATS:
 			NG_MKRESPONSE(resp, msg, sizeof(struct ng_patch_stats),
-			    M_WAIT);
+			    M_WAITOK);
 			bcopy(&(privp->stats), resp->data,
 			    sizeof(struct ng_patch_stats));
 			if (clear == 0)


More information about the svn-src-stable-8 mailing list