From owner-freebsd-current@FreeBSD.ORG Wed Aug 17 12:39:16 2005 Return-Path: X-Original-To: current@freebsd.org 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 8121F16A41F for ; Wed, 17 Aug 2005 12:39:16 +0000 (GMT) (envelope-from keramida@freebsd.org) Received: from kane.otenet.gr (kane.otenet.gr [195.170.0.95]) by mx1.FreeBSD.org (Postfix) with ESMTP id 39B7C43D46 for ; Wed, 17 Aug 2005 12:39:14 +0000 (GMT) (envelope-from keramida@freebsd.org) Received: from flame.pc (aris.bedc.ondsl.gr [62.103.39.226]) by kane.otenet.gr (8.13.4/8.13.4/Debian-1) with SMTP id j7HCdDg1011267; Wed, 17 Aug 2005 15:39:13 +0300 Received: from flame.pc (flame [127.0.0.1]) by flame.pc (8.13.4/8.13.4) with ESMTP id j7HCj0W0015085; Wed, 17 Aug 2005 15:45:00 +0300 (EEST) (envelope-from keramida@freebsd.org) Received: (from keramida@localhost) by flame.pc (8.13.4/8.13.4/Submit) id j7HCixqt015084; Wed, 17 Aug 2005 15:44:59 +0300 (EEST) (envelope-from keramida@freebsd.org) Date: Wed, 17 Aug 2005 15:44:59 +0300 From: Giorgos Keramidas To: Poul-Henning Kamp Message-ID: <20050817124459.GF1084@flame.pc> References: <17182.1124270021@phk.freebsd.dk> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <17182.1124270021@phk.freebsd.dk> Cc: current@freebsd.org Subject: Re: Giant around fdfree() in exit1() ? X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 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: Wed, 17 Aug 2005 12:39:16 -0000 On 2005-08-17 11:13, Poul-Henning Kamp wrote: > > I'm seeing Giant held in a MNTK_MPSAFE devfs->close without this patch, > any insight/comments ? fdfree() releases POSIX locks the descriptor has. Is it ok to call VOP_ADVLOCK(..., F_UNLCK, ...) and free() without holding Giant? > Index: kern/kern_exit.c > =================================================================== > RCS file: /home/ncvs/src/sys/kern/kern_exit.c,v > retrieving revision 1.264 > diff -u -r1.264 kern_exit.c > --- kern/kern_exit.c 18 Jul 2005 20:08:14 -0000 1.264 > +++ kern/kern_exit.c 17 Aug 2005 08:42:38 -0000 > @@ -229,13 +229,13 @@ > */ > mtx_lock(&Giant); /* XXX: not sure if needed */ > funsetownlst(&p->p_sigiolst); > + mtx_unlock(&Giant); > > /* > * Close open files and release open-file table. > * This may block! > */ > fdfree(td); > - mtx_unlock(&Giant);