diff options
author | rwatson <rwatson@FreeBSD.org> | 2003-04-15 19:33:23 +0000 |
---|---|---|
committer | rwatson <rwatson@FreeBSD.org> | 2003-04-15 19:33:23 +0000 |
commit | ee9586205424c714206cac19273ca20ce51452cc (patch) | |
tree | cae7c3a765d58624d374a9347a9fbbd5bcd6c2b4 | |
parent | 07a0e2efde73a7d736dd8f2e042781df95cd0823 (diff) | |
download | FreeBSD-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
-rw-r--r-- | sys/kern/kern_mac.c | 5 | ||||
-rw-r--r-- | sys/security/mac/mac_framework.c | 5 | ||||
-rw-r--r-- | sys/security/mac/mac_internal.h | 5 | ||||
-rw-r--r-- | sys/security/mac/mac_net.c | 5 | ||||
-rw-r--r-- | sys/security/mac/mac_pipe.c | 5 | ||||
-rw-r--r-- | sys/security/mac/mac_process.c | 5 | ||||
-rw-r--r-- | sys/security/mac/mac_syscalls.c | 5 | ||||
-rw-r--r-- | sys/security/mac/mac_system.c | 5 | ||||
-rw-r--r-- | sys/security/mac/mac_vfs.c | 5 |
9 files changed, 18 insertions, 27 deletions
diff --git a/sys/kern/kern_mac.c b/sys/kern/kern_mac.c index 2650874..8524c0c 100644 --- a/sys/kern/kern_mac.c +++ b/sys/kern/kern_mac.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); diff --git a/sys/security/mac/mac_framework.c b/sys/security/mac/mac_framework.c index 2650874..8524c0c 100644 --- a/sys/security/mac/mac_framework.c +++ b/sys/security/mac/mac_framework.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); diff --git a/sys/security/mac/mac_internal.h b/sys/security/mac/mac_internal.h index 2650874..8524c0c 100644 --- a/sys/security/mac/mac_internal.h +++ b/sys/security/mac/mac_internal.h @@ -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); diff --git a/sys/security/mac/mac_net.c b/sys/security/mac/mac_net.c index 2650874..8524c0c 100644 --- a/sys/security/mac/mac_net.c +++ b/sys/security/mac/mac_net.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); 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); diff --git a/sys/security/mac/mac_process.c b/sys/security/mac/mac_process.c index 2650874..8524c0c 100644 --- a/sys/security/mac/mac_process.c +++ b/sys/security/mac/mac_process.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); diff --git a/sys/security/mac/mac_syscalls.c b/sys/security/mac/mac_syscalls.c index 2650874..8524c0c 100644 --- a/sys/security/mac/mac_syscalls.c +++ b/sys/security/mac/mac_syscalls.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); diff --git a/sys/security/mac/mac_system.c b/sys/security/mac/mac_system.c index 2650874..8524c0c 100644 --- a/sys/security/mac/mac_system.c +++ b/sys/security/mac/mac_system.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); diff --git a/sys/security/mac/mac_vfs.c b/sys/security/mac/mac_vfs.c index 2650874..8524c0c 100644 --- a/sys/security/mac/mac_vfs.c +++ b/sys/security/mac/mac_vfs.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); |