From owner-cvs-all@FreeBSD.ORG Thu Sep 8 14:26:23 2005 Return-Path: X-Original-To: cvs-all@FreeBSD.org Delivered-To: cvs-all@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 869B016A41F; Thu, 8 Sep 2005 14:26:23 +0000 (GMT) (envelope-from glebius@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5A67A43D45; Thu, 8 Sep 2005 14:26:23 +0000 (GMT) (envelope-from glebius@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id j88EQN0g040739; Thu, 8 Sep 2005 14:26:23 GMT (envelope-from glebius@repoman.freebsd.org) Received: (from glebius@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id j88EQNFA040738; Thu, 8 Sep 2005 14:26:23 GMT (envelope-from glebius) Message-Id: <200509081426.j88EQNFA040738@repoman.freebsd.org> From: Gleb Smirnoff Date: Thu, 8 Sep 2005 14:26:23 +0000 (UTC) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: HEAD Cc: Subject: cvs commit: src/sys/netgraph ng_pptpgre.c X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Sep 2005 14:26:23 -0000 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