cvs commit: src/sys/netgraph ng_pptpgre.c
glebius at FreeBSD.org
Thu Sep 8 07:26:23 PDT 2005
glebius 2005-09-08 14:26:23 UTC
FreeBSD src repository
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
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.
- 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