diff options
author | dwmalone <dwmalone@FreeBSD.org> | 2003-05-29 18:38:24 +0000 |
---|---|---|
committer | dwmalone <dwmalone@FreeBSD.org> | 2003-05-29 18:38:24 +0000 |
commit | 2220e22eed9f7d0d271a4fafef71285c49f5e926 (patch) | |
tree | 533b57419be463834e906e7005c3a334ec5580f4 /sys/kern/subr_mbuf.c | |
parent | a02706ac9315f0d50e6a05572a574d74c2eb84d9 (diff) | |
download | FreeBSD-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.c | 2 |
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; |