Giant around fdfree() in exit1() ?

From: Poul-Henning Kamp <phk_at_phk.freebsd.dk>
Date: Wed, 17 Aug 2005 11:13:41 +0200
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
_at__at_ -229,13 +229,13 _at__at_
 	 */
 	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_at_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.
Received on Wed Aug 17 2005 - 07:13:43 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:38:41 UTC