From owner-freebsd-current@FreeBSD.ORG Mon Aug 30 09:57:32 2004 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D859516A4CE; Mon, 30 Aug 2004 09:57:32 +0000 (GMT) Received: from cell.sick.ru (cell.sick.ru [217.72.144.68]) by mx1.FreeBSD.org (Postfix) with ESMTP id 23F4443D1D; Mon, 30 Aug 2004 09:57:32 +0000 (GMT) (envelope-from glebius@freebsd.org) Received: from cell.sick.ru (glebius@localhost [127.0.0.1]) by cell.sick.ru (8.12.11/8.12.8) with ESMTP id i7U9vT1Q030850 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 30 Aug 2004 13:57:30 +0400 (MSD) (envelope-from glebius@freebsd.org) Received: (from glebius@localhost) by cell.sick.ru (8.12.11/8.12.11/Submit) id i7U9vTBB030849; Mon, 30 Aug 2004 13:57:29 +0400 (MSD) (envelope-from glebius@freebsd.org) X-Authentication-Warning: cell.sick.ru: glebius set sender to glebius@freebsd.org using -f Date: Mon, 30 Aug 2004 13:57:29 +0400 From: Gleb Smirnoff To: "Bjoern A. Zeeb" Message-ID: <20040830095729.GD30701@cell.sick.ru> References: Mime-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.6i cc: Robert Watson cc: FreeBSD current mailing list Subject: Re: mutex Giant not owned at /usr/src/sys/kern/vfs_vnops.c:120 X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Aug 2004 09:57:33 -0000 Robert, Bjoern, On Mon, Aug 30, 2004 at 05:29:56AM +0000, Bjoern A. Zeeb wrote: B> > Could you try the following patch: B> B> seems to work fine; my test program crashes somewhen later cause of B> some pthread probelm but modules got loaded successfully w/o panic. B> > This causes Giant to be acquired in the event we enter the linker code B> > (and hence VFS code) via netgraph ngc_send(). It should be safe in this B> > context as we enter protocol send routines without mutexes held (i.e., why B> > we're also able to do blocking memory allocation here.) B> B> please commit. I think Giant should be acquired in linker_load_module(), and this way we will prevent this panic in other codepaths. For example in vfs_mount.c, when vfs will be Giant-free. Have I missed something? -- Totus tuus, Glebius. GLEBIUS-RIPN GLEB-RIPE