cvs commit: src/sys/netgraph ng_base.c

Gleb Smirnoff glebius at FreeBSD.org
Wed Nov 2 07:23:51 PST 2005


glebius     2005-11-02 15:23:47 UTC

  FreeBSD src repository

  Modified files:
    sys/netgraph         ng_base.c 
  Log:
  Fix two races which happen when netgraph is restructuring:
    - Introduce ng_topo_mtx, a mutex to protect topology changes.
    - In ng_destroy_node() protect with ng_topo_mtx the process
      of checking and pointing at ng_deadnode. [1]
    - In ng_con_part2() check that our peer is not a ng_deadnode,
      and protect the check with ng_topo_mtx.
    - Add KASSERTs to ng_acquire_read/write, to make more
      understandible synopsis in case if called on ng_deadnode.
  
  Reported by:    Roselyn Lee [1]
  
  Revision  Changes    Path
  1.117     +47 -8     src/sys/netgraph/ng_base.c


More information about the cvs-src mailing list