Date: Fri, 1 Feb 2002 04:43:39 +1100 (EST) From: Bruce Evans <bde@zeta.org.au> To: <alfred@freebsd.org> Cc: <current@freebsd.org> Subject: lock reversal in fdalloc() Message-ID: <20020201043751.O5590-100000@gamplex.bde.org>
next in thread | raw e-mail | index | archive | help
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. Bruce To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020201043751.O5590-100000>