Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 30 Aug 2004 18:40:41 +0400
From:      Gleb Smirnoff <glebius@freebsd.org>
To:        Robert Watson <rwatson@freebsd.org>
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:  <20040830144041.GA33772@cell.sick.ru>
In-Reply-To: <Pine.NEB.3.96L.1040830102627.18639D-100000@fledge.watson.org>
References:  <20040830095729.GD30701@cell.sick.ru> <Pine.NEB.3.96L.1040830102627.18639D-100000@fledge.watson.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, Aug 30, 2004 at 10:35:05AM -0400, Robert Watson wrote:
R> > B> > This causes Giant to be acquired in the event we enter the linker code
R> > B> > (and hence VFS code) via netgraph ngc_send().  It should be safe in this
R> > B> > context as we enter protocol send routines without mutexes held (i.e., why
R> > B> > we're also able to do blocking memory allocation here.)
R> > B> 
R> > B> please commit.
R> > 
R> > I think Giant should be acquired in linker_load_module(), and this way
R> > we will prevent this panic in other codepaths. For example in
R> > vfs_mount.c, when vfs will be Giant-free. Have I missed something?
R> 
R> Well, one of the primary reasons the linker needs Giant here is its use of
R> VFS.  I think for now I'd like to acquire Giant in netgraph so as to
R> expose the use of Giant in that piece of the network stack in the calling
R> code.  We might want to add GIANT_REQUIRED assertions in the linker code
R> to make sure we trigger assertions even if the linker doesn't hit VFS to
R> make sure potentially hitting Giant is caught.

OK. Then commit it pls.

-- 
Totus tuus, Glebius.
GLEBIUS-RIPN GLEB-RIPE



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