diff options
author | Robert Watson <rwatson@FreeBSD.org> | 2002-10-05 21:23:47 +0000 |
---|---|---|
committer | Robert Watson <rwatson@FreeBSD.org> | 2002-10-05 21:23:47 +0000 |
commit | 83985c267e969de293fa632b1af82e72a8a8bbea (patch) | |
tree | c761fa053a4d22f10903c9ddd53565b138238188 /sys/security/mac_stub | |
parent | ba7fd983ae1705451139b1bb4b90688924bcd511 (diff) | |
download | src-83985c267e969de293fa632b1af82e72a8a8bbea.tar.gz src-83985c267e969de293fa632b1af82e72a8a8bbea.zip |
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
Notes
Notes:
svn path=/head/; revision=104541
Diffstat (limited to 'sys/security/mac_stub')
-rw-r--r-- | sys/security/mac_stub/mac_stub.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/security/mac_stub/mac_stub.c b/sys/security/mac_stub/mac_stub.c index 3029e03c5217..9bbc1cd7fa8b 100644 --- a/sys/security/mac_stub/mac_stub.c +++ b/sys/security/mac_stub/mac_stub.c @@ -858,9 +858,9 @@ static struct mac_policy_op_entry mac_none_ops[] = { MAC_INIT_PIPE_LABEL, (macop_t)mac_none_init_label }, { MAC_INIT_SOCKET_LABEL, - (macop_t)mac_none_init_label }, + (macop_t)mac_none_init_label_waitcheck }, { MAC_INIT_SOCKET_PEER_LABEL, - (macop_t)mac_none_init_label }, + (macop_t)mac_none_init_label_waitcheck }, { MAC_INIT_TEMP_LABEL, (macop_t)mac_none_init_label }, { MAC_INIT_VNODE_LABEL, |