]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Rework locking, that I have introduced recently, since it was incorrect:
authorglebius <glebius@FreeBSD.org>
Thu, 8 Sep 2005 14:26:23 +0000 (14:26 +0000)
committerglebius <glebius@FreeBSD.org>
Thu, 8 Sep 2005 14:26:23 +0000 (14:26 +0000)
commit0743267ea67ca596ce0ce9ac95bb2bae9c7c8841
tree99b548512428cb7e8115f4bc58f93a3d9d5d4c4f
parent8f3eb2a42516bd9997f65e3756ab112b9c4d1f77
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.
sys/netgraph/ng_pptpgre.c