Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 3 May 2004 14:07:53 -0700 (PDT)
From:      Robert Watson <rwatson@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 52165 for review
Message-ID:  <200405032107.i43L7rKo033038@repoman.freebsd.org>

index | next in thread | raw e-mail

http://perforce.freebsd.org/chv.cgi?CH=52165

Change 52165 by rwatson@rwatson_tislabs on 2004/05/03 14:07:20

	When asserting an mbuf label pointer, don't perform the test if
	the label pointer is NULL, which can happen if mac_test is
	loaded after system boot, so mbufs are in flight that don't
	have label state allocated.

Affected files ...

.. //depot/projects/trustedbsd/mac/sys/security/mac_test/mac_test.c#131 edit

Differences ...

==== //depot/projects/trustedbsd/mac/sys/security/mac_test/mac_test.c#131 (text+ko) ====

@@ -115,8 +115,9 @@
 	SLOT(x) == 0, ("%s: Bad INPCB label", __func__ ))
 #define	ASSERT_IPQ_LABEL(x)	KASSERT(SLOT(x) == IPQMAGIC ||	\
 	SLOT(x) == 0, ("%s: Bad IPQ label", __func__ ))
-#define	ASSERT_MBUF_LABEL(x)	KASSERT(SLOT(x) == MBUFMAGIC ||		\
-	SLOT(x) == 0, ("%s: Bad MBUF label", __func__ ))
+#define	ASSERT_MBUF_LABEL(x)	KASSERT(x == NULL ||			\
+	SLOT(x) == MBUFMAGIC || SLOT(x) == 0, ("%s: Bad MBUF label",	\
+	__func__ ))
 #define	ASSERT_MOUNT_LABEL(x)	KASSERT(SLOT(x) == MOUNTMAGIC ||	\
 	SLOT(x) == 0, ("%s: Bad MOUNT label", __func__ ))
 #define	ASSERT_SOCKET_LABEL(x)	KASSERT(SLOT(x) == SOCKETMAGIC ||	\


home | help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200405032107.i43L7rKo033038>