From owner-freebsd-current@FreeBSD.ORG Wed Aug 17 09:13:43 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 D085F16A41F for ; Wed, 17 Aug 2005 09:13:43 +0000 (GMT) (envelope-from phk@phk.freebsd.dk) Received: from haven.freebsd.dk (haven.freebsd.dk [130.225.244.222]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6470943D49 for ; Wed, 17 Aug 2005 09:13:43 +0000 (GMT) (envelope-from phk@phk.freebsd.dk) Received: from phk.freebsd.dk (unknown [192.168.48.2]) by haven.freebsd.dk (Postfix) with ESMTP id ED750BC66 for ; Wed, 17 Aug 2005 09:13:41 +0000 (UTC) To: current@freebsd.org From: Poul-Henning Kamp Date: Wed, 17 Aug 2005 11:13:41 +0200 Message-ID: <17182.1124270021@phk.freebsd.dk> Sender: phk@phk.freebsd.dk Cc: Subject: 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 09:13:43 -0000 I'm seeing Giant held in a MNTK_MPSAFE devfs->close without this patch, any insight/comments ? 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); /* * If this thread tickled GEOM, we need to wait for the giggling to -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 phk@FreeBSD.ORG | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe Never attribute to malice what can adequately be explained by incompetence.