PERFORCE change 52165 for review
    Robert Watson 
    rwatson at FreeBSD.org
       
    Mon May  3 14:07:55 PDT 2004
    
    
  
http://perforce.freebsd.org/chv.cgi?CH=52165
Change 52165 by rwatson at 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 ||	\
    
    
More information about the p4-projects
mailing list