Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 30 Aug 2004 13:57:29 +0400
From:      Gleb Smirnoff <glebius@freebsd.org>
To:        "Bjoern A. Zeeb" <bzeeb-lists@lists.zabbadoz.net>
Cc:        FreeBSD current mailing list <current@freebsd.org>
Subject:   Re: mutex Giant not owned at /usr/src/sys/kern/vfs_vnops.c:120
Message-ID:  <20040830095729.GD30701@cell.sick.ru>
In-Reply-To: <Pine.BSF.4.53.0408300526540.80509@e0-0.zab2.int.zabbadoz.net>
References:  <Pine.NEB.3.96L.1040830002424.1492A-100000@fledge.watson.org> <Pine.BSF.4.53.0408300526540.80509@e0-0.zab2.int.zabbadoz.net>

next in thread | previous in thread | raw e-mail | index | archive | help
  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.

<skip>

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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040830095729.GD30701>