cvs commit: src/sys/security/mac_portacl mac_portacl.c

Robert Watson rwatson at FreeBSD.org
Mon Dec 6 11:43:46 PST 2004


rwatson     2004-12-06 19:43:46 UTC

  FreeBSD src repository

  Modified files:
    sys/security/mac_portacl mac_portacl.c 
  Log:
  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.6       +19 -26    src/sys/security/mac_portacl/mac_portacl.c


More information about the cvs-src mailing list