summaryrefslogtreecommitdiffstats
path: root/sys/kern/subr_mbuf.c
diff options
context:
space:
mode:
authordwmalone <dwmalone@FreeBSD.org>2003-05-29 18:38:24 +0000
committerdwmalone <dwmalone@FreeBSD.org>2003-05-29 18:38:24 +0000
commit2220e22eed9f7d0d271a4fafef71285c49f5e926 (patch)
tree533b57419be463834e906e7005c3a334ec5580f4 /sys/kern/subr_mbuf.c
parenta02706ac9315f0d50e6a05572a574d74c2eb84d9 (diff)
downloadFreeBSD-src-2220e22eed9f7d0d271a4fafef71285c49f5e926.zip
FreeBSD-src-2220e22eed9f7d0d271a4fafef71285c49f5e926.tar.gz
Add an INVARIENTS only check to make sure Giant is held if mbuf
allocation is attempted with M_TRYWAIT. Reviewed by: bmilekic Approved by: re (scottl)
Diffstat (limited to 'sys/kern/subr_mbuf.c')
-rw-r--r--sys/kern/subr_mbuf.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/kern/subr_mbuf.c b/sys/kern/subr_mbuf.c
index 692316f..943d2eb 100644
--- a/sys/kern/subr_mbuf.c
+++ b/sys/kern/subr_mbuf.c
@@ -629,6 +629,8 @@ mb_alloc(struct mb_lstmngr *mb_list, int how, short type, short persist,
how = M_TRYWAIT;
}
}
+ if ((flags & M_DONTWAIT) == 0)
+ GIANT_REQUIRED;
#endif
m = NULL;
OpenPOWER on IntegriCloud