* Scott Long <scottl_at_FreeBSD.org> [041001 07:33] wrote: > Alfred Perlstein wrote: > >>| | | | The LOR reported in | > >>| | | | PR kern/55175 needs | > >>| filedesc LOR | Not done | -- | to be fixed. | > >>| | | | Filedesc locking | > >>| | | | needs to be heavily | > >>| | | | reviewed in general. | > > > > > >Oy this thing... :) > > > >The only thing blocking this was that we need to access the filedesc > >as the process shuts down for nfs locks, Darwin has a workaround that > >I'll see if i can incorporate. > > > > Is this one still actually a problem? I haven't seen anyone complain > about it in months. Yes. :) in kern_descript.c:fdfree() we have this: /* * We are the last reference to the structure, so we can * safely assume it will not change out from under us. */ FILEDESC_UNLOCK(fdp); fpp = fdp->fd_ofiles; for (i = fdp->fd_lastfile; i-- >= 0; fpp++) { if (*fpp) (void) closef(*fpp, td); } /* XXX This should happen earlier. */ mtx_lock(&fdesc_mtx); td->td_proc->p_fd = NULL; mtx_unlock(&fdesc_mtx); Basically we have an unlocked access to the filedesc here. The "should happen earlier" refers to swapping the order of these two code blocks, but we can not because NFS locking currently requires that the filedesc be around until the very last file is released. I may be able to merge a fix from Darwin for this, but I'm waiting on an A-OK for it. -- - Alfred Perlstein - Research Engineering Development Inc. - email: bright_at_mu.org cell: 408-480-4684Received on Fri Oct 01 2004 - 12:49:08 UTC
This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:38:15 UTC