summaryrefslogtreecommitdiffstats
path: root/sys/security/mac/mac_pipe.c
diff options
context:
space:
mode:
authorrwatson <rwatson@FreeBSD.org>2003-04-15 19:33:23 +0000
committerrwatson <rwatson@FreeBSD.org>2003-04-15 19:33:23 +0000
commitee9586205424c714206cac19273ca20ce51452cc (patch)
treecae7c3a765d58624d374a9347a9fbbd5bcd6c2b4 /sys/security/mac/mac_pipe.c
parent07a0e2efde73a7d736dd8f2e042781df95cd0823 (diff)
downloadFreeBSD-src-ee9586205424c714206cac19273ca20ce51452cc.zip
FreeBSD-src-ee9586205424c714206cac19273ca20ce51452cc.tar.gz
mac_init_mbuf_tag() accepts malloc flags, not mbuf allocator flags, so
don't try and convert the argument flags to malloc flags, or we risk implicitly requesting blocking and generating witness warnings. Obtained from: TrustedBSD Project Sponsored by: DARPA, Network Associates Laboratories
Diffstat (limited to 'sys/security/mac/mac_pipe.c')
-rw-r--r--sys/security/mac/mac_pipe.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/sys/security/mac/mac_pipe.c b/sys/security/mac/mac_pipe.c
index 2650874..8524c0c 100644
--- a/sys/security/mac/mac_pipe.c
+++ b/sys/security/mac/mac_pipe.c
@@ -783,13 +783,12 @@ int
mac_init_mbuf_tag(struct m_tag *tag, int flag)
{
struct label *label;
- int error, trflag;
+ int error;
label = (struct label *) (tag + 1);
mac_init_label(label);
- trflag = (flag == M_DONTWAIT ? M_NOWAIT : M_WAITOK);
- MAC_CHECK(init_mbuf_label, label, trflag);
+ MAC_CHECK(init_mbuf_label, label, flag);
if (error) {
MAC_PERFORM(destroy_mbuf_label, label);
mac_destroy_label(label);
OpenPOWER on IntegriCloud