summaryrefslogtreecommitdiffstats
path: root/sys/netgraph/ng_bpf.c
diff options
context:
space:
mode:
authorarchie <archie@FreeBSD.org>2000-09-21 18:01:23 +0000
committerarchie <archie@FreeBSD.org>2000-09-21 18:01:23 +0000
commit1023c32e1a3679b96f5d97f326b05c06529b214c (patch)
treed5267989f77e49fdb5fc4a6aa641c0b91e4bf969 /sys/netgraph/ng_bpf.c
parent2ecfa84ffe04f743aceb5489b27662b68b563e18 (diff)
downloadFreeBSD-src-1023c32e1a3679b96f5d97f326b05c06529b214c.zip
FreeBSD-src-1023c32e1a3679b96f5d97f326b05c06529b214c.tar.gz
Allocate all memory (including within node constructors) with M_NOWAIT
instead of M_WAITOK, to allow for maximum flexibility.
Diffstat (limited to 'sys/netgraph/ng_bpf.c')
-rw-r--r--sys/netgraph/ng_bpf.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/netgraph/ng_bpf.c b/sys/netgraph/ng_bpf.c
index c198b11..f986e8f 100644
--- a/sys/netgraph/ng_bpf.c
+++ b/sys/netgraph/ng_bpf.c
@@ -237,7 +237,7 @@ ng_bpf_newhook(node_p node, hook_p hook, const char *name)
int error;
/* Create hook private structure */
- MALLOC(hip, hinfo_p, sizeof(*hip), M_NETGRAPH, M_WAITOK);
+ MALLOC(hip, hinfo_p, sizeof(*hip), M_NETGRAPH, M_NOWAIT);
if (hip == NULL)
return (ENOMEM);
bzero(hip, sizeof(*hip));
@@ -489,7 +489,7 @@ ng_bpf_setprog(hook_p hook, const struct ng_bpf_hookprog *hp0)
/* Make a copy of the program */
size = NG_BPF_HOOKPROG_SIZE(hp0->bpf_prog_len);
- MALLOC(hp, struct ng_bpf_hookprog *, size, M_NETGRAPH, M_WAITOK);
+ MALLOC(hp, struct ng_bpf_hookprog *, size, M_NETGRAPH, M_NOWAIT);
if (hp == NULL)
return (ENOMEM);
bcopy(hp0, hp, size);
OpenPOWER on IntegriCloud