Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 8 Sep 2005 14:26:23 +0000 (UTC)
From:      Gleb Smirnoff <glebius@FreeBSD.org>
To:        src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org
Subject:   cvs commit: src/sys/netgraph ng_pptpgre.c
Message-ID:  <200509081426.j88EQNFA040738@repoman.freebsd.org>

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



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