From owner-p4-projects@FreeBSD.ORG Mon May 3 14:07:54 2004 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 67A9B16A4D0; Mon, 3 May 2004 14:07:54 -0700 (PDT) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3D4B216A4CE for ; Mon, 3 May 2004 14:07:54 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2A58043D41 for ; Mon, 3 May 2004 14:07:54 -0700 (PDT) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.10/8.12.10) with ESMTP id i43L7rGe033041 for ; Mon, 3 May 2004 14:07:54 -0700 (PDT) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.10/8.12.10/Submit) id i43L7rKo033038 for perforce@freebsd.org; Mon, 3 May 2004 14:07:53 -0700 (PDT) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Date: Mon, 3 May 2004 14:07:53 -0700 (PDT) Message-Id: <200405032107.i43L7rKo033038@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to bb+lists.freebsd.perforce@cyrus.watson.org using -f From: Robert Watson To: Perforce Change Reviews Subject: PERFORCE change 52165 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 May 2004 21:07:55 -0000 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 || \