* Bruce Evans <[EMAIL PROTECTED]> [020131 09:42] wrote: > Jan 31 18:27:29 gamplex kernel: lock order reversal > Jan 31 18:27:29 gamplex kernel: 1st 0xc26ea034 filedesc structure @ >./@/kern/kern_descrip.c:925 > Jan 31 18:27:29 gamplex kernel: 2nd 0xc031eca0 Giant @ ./@/kern/kern_descrip.c:959 > > %%% > Index: kern_descrip.c > =================================================================== > RCS file: /home/ncvs/src/sys/kern/kern_descrip.c,v > retrieving revision 1.122 > diff -u -2 -r1.122 kern_descrip.c > --- kern_descrip.c 29 Jan 2002 22:54:19 -0000 1.122 > +++ kern_descrip.c 31 Jan 2002 07:32:43 -0000 > @@ -957,7 +967,9 @@ > fdexpand++; > if (oldofile != NULL) { > + FILEDESC_UNLOCK(fdp); > mtx_lock(&Giant); > FREE(oldofile, M_FILEDESC); > mtx_unlock(&Giant); > + FILEDESC_LOCK(fdp); > } > } > %%% > > I'm not sure that releasing the lock here is safe, but other parts of > fdalloc() do this.
I don't think this is safe at a glance, I think it's only safe right before return'ing from the function. I'll look at it later tonight. -Alfred To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-current" in the body of the message