summaryrefslogtreecommitdiffstats
path: root/sys/security
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
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')
-rw-r--r--sys/security/mac/mac_framework.c5
-rw-r--r--sys/security/mac/mac_internal.h5
-rw-r--r--sys/security/mac/mac_net.c5
-rw-r--r--sys/security/mac/mac_pipe.c5
-rw-r--r--sys/security/mac/mac_process.c5
-rw-r--r--sys/security/mac/mac_syscalls.c5
-rw-r--r--sys/security/mac/mac_system.c5
-rw-r--r--sys/security/mac/mac_vfs.c5
8 files changed, 16 insertions, 24 deletions
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);
OpenPOWER on IntegriCloud