svn commit: r221004 - stable/7/sys/netgraph
Andrey V. Elsukov
ae at FreeBSD.org
Mon Apr 25 04:33:43 UTC 2011
Author: ae
Date: Mon Apr 25 04:33:42 2011
New Revision: 221004
URL: http://svn.freebsd.org/changeset/base/221004
Log:
MFC r220767:
Use M_WAITOK flag instead M_WAIT for malloc.
Suggested by: glebius
Modified:
stable/7/sys/netgraph/ng_patch.c
Directory Properties:
stable/7/sys/ (props changed)
stable/7/sys/cddl/contrib/opensolaris/ (props changed)
stable/7/sys/contrib/dev/acpica/ (props changed)
stable/7/sys/contrib/pf/ (props changed)
Modified: stable/7/sys/netgraph/ng_patch.c
==============================================================================
--- stable/7/sys/netgraph/ng_patch.c Mon Apr 25 04:33:13 2011 (r221003)
+++ stable/7/sys/netgraph/ng_patch.c Mon Apr 25 04:33:42 2011 (r221004)
@@ -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
mailing list