Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 6 Dec 2004 19:43:46 +0000 (UTC)
From:      Robert Watson <rwatson@FreeBSD.org>
To:        src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org
Subject:   cvs commit: src/sys/security/mac_portacl mac_portacl.c
Message-ID:  <200412061943.iB6JhkOk002387@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200412061943.iB6JhkOk002387>