cvs commit: src/sys/netgraph ng_pptpgre.c

Gleb Smirnoff glebius at FreeBSD.org
Thu Sep 8 07:26:23 PDT 2005


glebius     2005-09-08 14:26:23 UTC

  FreeBSD src repository

  Modified files:
    sys/netgraph         ng_pptpgre.c 
  Log:
  Rework locking, that I have introduced recently, since it was incorrect:
  
    First, mutexed callouts are incompatible with netgraph nodes, because
    netgraph(4) can guarantee that the function will be called with mutex
    held.
  
    Second, nodes should not send data to their neighbor holding their
    mutex. A node does not know what stack can it enter sending data in
    some direction. May be executing will encounter a place to sleep.
  
  New locking:
  
    - ng_pptpgre_recv() and ng_pptpgre_xmit() must be entered with mutex held.
    - ng_pptpgre_recv() and ng_pptpgre_xmit() unlock mutex before
      sending data and then return unlocked.
    - callout routines acquire mutex themselves.
  
  Revision  Changes    Path
  1.39      +54 -35    src/sys/netgraph/ng_pptpgre.c


More information about the cvs-src mailing list