From owner-freebsd-hackers@FreeBSD.ORG Mon Sep 26 08:48:42 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id BEC3B16A41F for ; Mon, 26 Sep 2005 08:48:42 +0000 (GMT) (envelope-from simon@comsys.ntu-kpi.kiev.ua) Received: from comsys.ntu-kpi.kiev.ua (comsys.ntu-kpi.kiev.ua [195.245.194.142]) by mx1.FreeBSD.org (Postfix) with ESMTP id 07C2443D49 for ; Mon, 26 Sep 2005 08:48:40 +0000 (GMT) (envelope-from simon@comsys.ntu-kpi.kiev.ua) Received: from pm514-9.comsys.ntu-kpi.kiev.ua (pm514-9.comsys.ntu-kpi.kiev.ua [10.18.54.109]) (authenticated bits=0) by comsys.ntu-kpi.kiev.ua (8.12.10/8.12.10) with ESMTP id j8Q8vAhw006235 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 26 Sep 2005 11:57:11 +0300 (EEST) Received: by pm514-9.comsys.ntu-kpi.kiev.ua (Postfix, from userid 1000) id 6E7441A3; Mon, 26 Sep 2005 11:45:50 +0300 (EEST) Date: Mon, 26 Sep 2005 11:45:50 +0300 From: Andrey Simonenko To: Sebastien Message-ID: <20050926084550.GA444@pm514-9.comsys.ntu-kpi.kiev.ua> References: <200509201949.53951.sebastien.bourdeauducq@gmail.com> <20050921080533.GA255@pm514-9.comsys.ntu-kpi.kiev.ua> <200509241706.47995.sebastien.bourdeauducq@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200509241706.47995.sebastien.bourdeauducq@gmail.com> User-Agent: Mutt/1.4.2.1i X-Spam-Status: No, score=-4.5 required=5.0 tests=ALL_TRUSTED,BAYES_00 autolearn=ham version=3.0.1 X-Spam-Checker-Version: SpamAssassin 3.0.1 (2004-10-22) on comsys.ntu-kpi.kiev.ua X-Virus-Scanned: ClamAV 0.82/1096/Wed Sep 21 10:08:33 2005 on comsys.ntu-kpi.kiev.ua X-Virus-Status: Clean Cc: freebsd-hackers@freebsd.org Subject: Re: Filesystem access from a KLD causes "vrele: negative ref cnt" panic X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Sep 2005 08:48:42 -0000 On Sat, Sep 24, 2005 at 05:06:47PM +0200, Sebastien wrote: > > > Should not rootvnode get reference, when fd_rdir or fd_cdir > > begins to point to it? Try to VREF() it. > > No change. > It is hard to say something not seeing and understanding the complete source code. But since fdinit() which is called from fork1() and fdfree() which is called from exit1() get and release reference on vnodes fd_cdir and fd_rdir point to, you need to follow this semantics.