From owner-freebsd-emulation@FreeBSD.ORG Sat Apr 21 17:50:50 2007 Return-Path: X-Original-To: emulation@freebsd.org Delivered-To: freebsd-emulation@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 6274816A406 for ; Sat, 21 Apr 2007 17:50:50 +0000 (UTC) (envelope-from des@des.no) Received: from tim.des.no (tim.des.no [194.63.250.121]) by mx1.freebsd.org (Postfix) with ESMTP id 1587C13C487 for ; Sat, 21 Apr 2007 17:50:49 +0000 (UTC) (envelope-from des@des.no) Received: from tim.des.no (localhost [127.0.0.1]) by spam.des.no (Postfix) with ESMTP id 629FC2084; Sat, 21 Apr 2007 19:20:32 +0200 (CEST) X-Spam-Tests: AWL X-Spam-Learn: disabled X-Spam-Score: 0.0/3.0 X-Spam-Checker-Version: SpamAssassin 3.1.7 (2006-10-05) on tim.des.no Received: from dwp.des.no (des.no [80.203.243.180]) by smtp.des.no (Postfix) with ESMTP id 503752049; Sat, 21 Apr 2007 19:20:32 +0200 (CEST) Received: by dwp.des.no (Postfix, from userid 1001) id 2DE715500; Sat, 21 Apr 2007 19:20:32 +0200 (CEST) From: des@des.no (Dag-Erling =?iso-8859-1?Q?Sm=F8rgrav?=) To: Roman Divacky References: <790a9fff0704201848y5f6587fehf34af106ae3f7285@mail.gmail.com> <20070421080604.GA79048@freebsd.org> <86lkgl4pkx.fsf@dwp.des.no> Date: Sat, 21 Apr 2007 19:20:31 +0200 In-Reply-To: <86lkgl4pkx.fsf@dwp.des.no> (Dag-Erling =?iso-8859-1?Q?Sm=F8r?= =?iso-8859-1?Q?grav's?= message of "Sat, 21 Apr 2007 19:14:38 +0200") Message-ID: <86hcr94pb4.fsf@dwp.des.no> User-Agent: Gnus/5.110006 (No Gnus v0.6) Emacs/21.3 (berkeley-unix) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Cc: emulation@freebsd.org, Scot Hetzel Subject: Re: linuxolator - ltp testing: panic with fsync02 test X-BeenThere: freebsd-emulation@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Development of Emulators of other operating systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 21 Apr 2007 17:50:50 -0000 --=-=-= Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable des@des.no (Dag-Erling Sm=F8rgrav) writes: > Roman Divacky writes: > > On Fri, Apr 20, 2007 at 08:48:11PM -0500, Scot Hetzel wrote: > > > Unread portion of the kernel message buffer: > > > panic: NOT MPSAFE and Giant not held > > I think this is related to MPSAFEing of pseudofs recently.. hopefully > > des can tell us more (CCed) > Yes, linprocfs_domtab() needs to call VFS_LOCK_GIANT() before namei(). Here's a tentative patch. DES --=20 Dag-Erling Sm=F8rgrav - des@des.no --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=linprocfs.diff Index: sys/compat/linprocfs/linprocfs.c =================================================================== RCS file: /home/ncvs/src/sys/compat/linprocfs/linprocfs.c,v retrieving revision 1.110 diff -u -r1.110 linprocfs.c --- sys/compat/linprocfs/linprocfs.c 15 Apr 2007 17:02:03 -0000 1.110 +++ sys/compat/linprocfs/linprocfs.c 21 Apr 2007 17:18:25 -0000 @@ -312,9 +312,11 @@ int error; /* resolve symlinks etc. in the emulation tree prefix */ - NDINIT(&nd, LOOKUP, FOLLOW, UIO_SYSSPACE, linux_emul_path, td); + NDINIT(&nd, LOOKUP, FOLLOW | MPSAFE, UIO_SYSSPACE, linux_emul_path, td); flep = NULL; - if (namei(&nd) != 0 || vn_fullpath(td, nd.ni_vp, &dlep, &flep) != 0) + error = namei(&nd); + VFS_UNLOCK_GIANT(NDHASGIANT(&nd)); + if (error != 0 || vn_fullpath(td, nd.ni_vp, &dlep, &flep) != 0) lep = linux_emul_path; else lep = dlep; --=-=-=--