diff options
author | rwatson <rwatson@FreeBSD.org> | 2003-03-26 15:12:03 +0000 |
---|---|---|
committer | rwatson <rwatson@FreeBSD.org> | 2003-03-26 15:12:03 +0000 |
commit | e5680de54abac941f9b0f099aec14f24e493feb4 (patch) | |
tree | edbc245cbca8647afd1e19854b10c0489fdc26fe /sys/netinet | |
parent | 8b9c7fb58f9ec620d4ec3143b3463523a89f2d9d (diff) | |
download | FreeBSD-src-e5680de54abac941f9b0f099aec14f24e493feb4.zip FreeBSD-src-e5680de54abac941f9b0f099aec14f24e493feb4.tar.gz |
Modify the mac_init_ipq() MAC Framework entry point to accept an
additional flags argument to indicate blocking disposition, and
pass in M_NOWAIT from the IP reassembly code to indicate that
blocking is not OK when labeling a new IP fragment reassembly
queue. This should eliminate some of the WITNESS warnings that
have started popping up since fine-grained IP stack locking
started going in; if memory allocation fails, the creation of
the fragment queue will be aborted.
Obtained from: TrustedBSD Project
Sponsored by: DARPA, Network Associates Laboratories
Diffstat (limited to 'sys/netinet')
-rw-r--r-- | sys/netinet/ip_input.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/sys/netinet/ip_input.c b/sys/netinet/ip_input.c index 44e4eda..e26cc8d 100644 --- a/sys/netinet/ip_input.c +++ b/sys/netinet/ip_input.c @@ -983,7 +983,10 @@ ip_reass(struct mbuf *m, struct ipqhead *head, struct ipq *fp, goto dropfrag; fp = mtod(t, struct ipq *); #ifdef MAC - mac_init_ipq(fp); + if (mac_init_ipq(fp, M_NOWAIT) != 0) { + m_free(t); + goto dropfrag; + } mac_create_ipq(m, fp); #endif TAILQ_INSERT_HEAD(head, fp, ipq_list); |