From owner-cvs-all@FreeBSD.ORG Mon Aug 16 01:42:52 2004 Return-Path: Delivered-To: cvs-all@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id DDFBF16A4D5; Mon, 16 Aug 2004 01:42:46 +0000 (GMT) Received: from green.homeunix.org (pcp04371970pcs.nrockv01.md.comcast.net [69.140.223.203]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4C67F43D45; Mon, 16 Aug 2004 01:42:46 +0000 (GMT) (envelope-from green@green.homeunix.org) Received: from green.homeunix.org (green@localhost [127.0.0.1]) by green.homeunix.org (8.13.1/8.13.1) with ESMTP id i7G1gj1G003957; Sun, 15 Aug 2004 21:42:45 -0400 (EDT) (envelope-from green@green.homeunix.org) Received: (from green@localhost) by green.homeunix.org (8.13.1/8.13.1/Submit) id i7G1gjMY003956; Sun, 15 Aug 2004 21:42:45 -0400 (EDT) (envelope-from green) Date: Sun, 15 Aug 2004 21:42:45 -0400 From: Brian Fundakowski Feldman To: John-Mark Gurney Message-ID: <20040816014244.GB3026@green.homeunix.org> References: <200408150624.i7F6OhhR074096@repoman.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200408150624.i7F6OhhR074096@repoman.freebsd.org> User-Agent: Mutt/1.5.6i cc: cvs-src@FreeBSD.org cc: src-committers@FreeBSD.org cc: cvs-all@FreeBSD.org Subject: Re: cvs commit: src/sys/cam/scsi scsi_target.c src/sys/dev/mii mii.c src/sys/fs/fifofs fifo_vnops.c src/sys/gnu/ext2fs ext2_vnops.c src/sys/kern init_main.c kern_conf.c kern_descrip.c kern_event.c kern_exec.c kern_exit.c kern_fork.c kern_sig.c sys_pipe.c tty.c ... X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 Aug 2004 01:42:53 -0000 On Sun, Aug 15, 2004 at 06:24:43AM +0000, John-Mark Gurney wrote: > jmg 2004-08-15 06:24:43 UTC > > FreeBSD src repository > > Modified files: > sys/cam/scsi scsi_target.c > sys/dev/mii mii.c > sys/fs/fifofs fifo_vnops.c > sys/gnu/ext2fs ext2_vnops.c > sys/kern init_main.c kern_conf.c kern_descrip.c > kern_event.c kern_exec.c kern_exit.c > kern_fork.c kern_sig.c sys_pipe.c tty.c > tty_cons.c uipc_socket.c uipc_socket2.c > uipc_syscalls.c vfs_aio.c vfs_subr.c > vfs_vnops.c > sys/net bpf.c if.c if_var.h if_vlan.c > sys/sys event.h eventvar.h filedesc.h proc.h > selinfo.h vnode.h > sys/ufs/ffs ffs_vnops.c > sys/ufs/ufs ufs_acl.c ufs_vnops.c > Log: > Add locking to the kqueue subsystem. This also makes the kqueue subsystem > a more complete subsystem, and removes the knowlege of how things are > implemented from the drivers. Include locking around filter ops, so a > module like aio will know when not to be unloaded if there are outstanding > knotes using it's filter ops. > > Currently, it uses the MTX_DUPOK even though it is not always safe to > aquire duplicate locks. Witness currently doesn't support the ability > to discover if a dup lock is ok (in some cases). Yay, kqueues for 5.3-RELEASE that won't panic/lock up my system!! Do you think we should make this change now? Index: kern_descrip.c =================================================================== RCS file: /usr/ncvs/src/sys/kern/kern_descrip.c,v retrieving revision 1.242 diff -u -r1.242 kern_descrip.c --- kern_descrip.c 15 Aug 2004 06:24:40 -0000 1.242 +++ kern_descrip.c 15 Aug 2004 23:56:05 -0000 @@ -684,7 +684,6 @@ fdp->fd_ofileflags[new] = fdp->fd_ofileflags[old] &~ UF_EXCLOSE; if (new > fdp->fd_lastfile) fdp->fd_lastfile = new; - FILEDESC_UNLOCK(fdp); *retval = new; /* @@ -695,7 +694,8 @@ * XXX this duplicates parts of close(). */ if (delfp != NULL) { - /* XXX need to call knote_fdclose() */ + knote_fdclose(td, new); + FILEDESC_UNLOCK(fdp); mtx_lock(&Giant); (void) closef(delfp, td); mtx_unlock(&Giant); @@ -709,6 +709,8 @@ } FILEDESC_UNLOCK(fdp); } + } else { + FILEDESC_UNLOCK(fdp); } return (0); } Also, would you mind if I gave it a quick once-over for the bigger style(9) concerns? No functional changes/code moving, just parentheses and such. -- Brian Fundakowski Feldman \'[ FreeBSD ]''''''''''\ <> green@FreeBSD.org \ The Power to Serve! \ Opinions expressed are my own. \,,,,,,,,,,,,,,,,,,,,,,\