From 74ec128a1cc11d5f9f7620636ba845fe578a57fc Mon Sep 17 00:00:00 2001 From: rwatson Date: Sat, 5 Oct 2002 21:23:47 +0000 Subject: Modify label allocation semantics for sockets: pass in soalloc's malloc flags so that we can call malloc with M_NOWAIT if necessary, avoiding potential sleeps while holding mutexes in the TCP syncache code. Similar to the existing support for mbuf label allocation: if we can't allocate all the necessary label store in each policy, we back out the label allocation and fail the socket creation. Sync from MAC tree. Obtained from: TrustedBSD Project Sponsored by: DARPA, Network Associates Laboratories --- sys/security/mac_biba/mac_biba.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sys/security/mac_biba') diff --git a/sys/security/mac_biba/mac_biba.c b/sys/security/mac_biba/mac_biba.c index 53d492d..b202cdb 100644 --- a/sys/security/mac_biba/mac_biba.c +++ b/sys/security/mac_biba/mac_biba.c @@ -1954,9 +1954,9 @@ static struct mac_policy_op_entry mac_biba_ops[] = { MAC_INIT_PIPE_LABEL, (macop_t)mac_biba_init_label }, { MAC_INIT_SOCKET_LABEL, - (macop_t)mac_biba_init_label }, + (macop_t)mac_biba_init_label_waitcheck }, { MAC_INIT_SOCKET_PEER_LABEL, - (macop_t)mac_biba_init_label }, + (macop_t)mac_biba_init_label_waitcheck }, { MAC_INIT_TEMP_LABEL, (macop_t)mac_biba_init_label }, { MAC_INIT_VNODE_LABEL, -- cgit v1.1