Date: Sun, 15 Aug 2004 21:42:45 -0400 From: Brian Fundakowski Feldman <green@FreeBSD.org> To: John-Mark Gurney <jmg@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 ... Message-ID: <20040816014244.GB3026@green.homeunix.org> In-Reply-To: <200408150624.i7F6OhhR074096@repoman.freebsd.org> References: <200408150624.i7F6OhhR074096@repoman.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
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. \,,,,,,,,,,,,,,,,,,,,,,\
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040816014244.GB3026>