From owner-p4-projects Thu Oct 31 8:40: 6 2002 Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 2216837B404; Thu, 31 Oct 2002 08:40:04 -0800 (PST) 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 C276037B401 for ; Thu, 31 Oct 2002 08:40:03 -0800 (PST) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 822BB43E6E for ; Thu, 31 Oct 2002 08:40:03 -0800 (PST) (envelope-from green@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.6/8.12.6) with ESMTP id g9VGchmV092887 for ; Thu, 31 Oct 2002 08:38:43 -0800 (PST) (envelope-from green@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.6/8.12.6/Submit) id g9VGcgmU092884 for perforce@freebsd.org; Thu, 31 Oct 2002 08:38:42 -0800 (PST) Date: Thu, 31 Oct 2002 08:38:42 -0800 (PST) Message-Id: <200210311638.g9VGcgmU092884@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to green@freebsd.org using -f From: Brian Feldman Subject: PERFORCE change 20481 for review To: Perforce Change Reviews Sender: owner-p4-projects@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG http://perforce.freebsd.org/chv.cgi?CH=20481 Change 20481 by green@green_laptop_2 on 2002/10/31 08:38:11 Make sure all the allocations in maybe_demote() occur without sleeping. Affected files ... .. //depot/projects/trustedbsd/mac/sys/security/mac_lomac/mac_lomac.c#31 edit Differences ... ==== //depot/projects/trustedbsd/mac/sys/security/mac_lomac/mac_lomac.c#31 (text+ko) ==== @@ -547,7 +547,7 @@ } mtx_unlock(&subj->mtx); if (mac_lomac_to_string(NULL, 0, &len, subjlabel) == 0 && - (text = malloc(len + 1, M_MACLOMAC, M_WAITOK)) != NULL) { + (text = malloc(len + 1, M_MACLOMAC, M_NOWAIT)) != NULL) { if (mac_lomac_to_string(text, len + 1, &len, subjlabel) == 0) subjlabeltext = text; @@ -555,7 +555,7 @@ free(text, M_MACLOMAC); } if (mac_lomac_to_string(NULL, 0, &len, objlabel) == 0 && - (text = malloc(len + 1, M_MACLOMAC, M_WAITOK)) != NULL) { + (text = malloc(len + 1, M_MACLOMAC, M_NOWAIT)) != NULL) { if (mac_lomac_to_string(text, len + 1, &len, objlabel) == 0) objlabeltext = text; To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe p4-projects" in the body of the message