Index: sys/kern/kern_descrip.c =================================================================== RCS file: /home/ncvs/src/sys/kern/kern_descrip.c,v retrieving revision 1.219 diff -u -r1.219 kern_descrip.c --- sys/kern/kern_descrip.c 15 Jan 2004 10:15:03 -0000 1.219 +++ sys/kern/kern_descrip.c 15 Jan 2004 18:11:48 -0000 @@ -1430,8 +1430,11 @@ FILEDESC_LOCK_ASSERT(fdp, MA_OWNED); newfdp = fdinit(fdp); FILEDESC_LOCK(newfdp); - if (fdp->fd_lastfile >= newfdp->fd_nfiles) + while (fdp->fd_lastfile >= newfdp->fd_nfiles) { + FILEDESC_UNLOCK(fdp); fdgrowtable(newfdp, fdp->fd_lastfile + 1); + FILEDESC_LOCK(fdp); + } KASSERT(newfdp->fd_nfiles > fdp->fd_lastfile, ("fdgrowtable() failed to grow table")); /* copy everything except kqueue descriptors */