]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
MFC 1.70:
authorglebius <glebius@FreeBSD.org>
Fri, 25 Nov 2005 14:26:40 +0000 (14:26 +0000)
committerglebius <glebius@FreeBSD.org>
Fri, 25 Nov 2005 14:26:40 +0000 (14:26 +0000)
commitd60eb7f43e292d693d40f0609e48c97b156b8b2e
treea1675c81607b163d0b994ff5dfb3da4c150a65bb
parentf85409be556f32e3f1ce8981c8d4baf06b34d09d
MFC 1.70:
  Fix several races between socket closure and node/hook
  destruction:
    - Backout 1.62, since it doesn't fix all possible
    problems.
    - Upon node creation, put an additional reference on node.
    - Add a mutex and refcounter to struct ngsock. Netgraph node,
      control socket and data socket all count as references.
    - Introduce ng_socket_free_priv() which removes one reference
      from ngsock, and frees it when all references has gone.
    - No direct pointers between pcbs and node, all pointing
      is done via struct ngsock and protected with mutex.
sys/netgraph/ng_socket.c