cvs commit: src/sys/security/mac_portacl mac_portacl.c
Robert Watson
rwatson at FreeBSD.org
Wed Dec 22 01:38:10 PST 2004
rwatson 2004-12-22 09:38:10 UTC
FreeBSD src repository
Modified files: (Branch: RELENG_5)
sys/security/mac_portacl mac_portacl.c
Log:
Merge mac_portacl.c:1.5 from HEAD to RELENG_5:
date: 2004/12/06 19:43:45; author: rwatson; state: Exp; lines: +19 -26
Switch from using an sx lock to a mutex for the mac_portacl rule chain:
the sx lock was used previously because we might sleep allocating
additional memory by using auto-extending sbufs. However, we no longer
do this, instead retaining the user-submitted rule string, so mutexes
can be used instead. Annotate the reason for not using the sbuf-related
rule-to-string code with a comment.
Switch to using TAILQ_CONCAT() instead of manual list copying, as it's
O(1), reducing the rule replacement step under the mutex from O(2N) to
O(2).
Remove now uneeded vnode-related includes.
MFC after: 2 weeks
Revision Changes Path
1.5.2.1 +19 -26 src/sys/security/mac_portacl/mac_portacl.c
More information about the cvs-src
mailing list