Date: Fri, 6 Dec 2002 20:33:55 -0800 From: Kris Kennaway <kris@obsecurity.org> To: Lars Eggert <larse@ISI.EDU> Cc: Kris Kennaway <kris@obsecurity.org>, current@FreeBSD.ORG, jhb@FreeBSD.org, alfred@FreeBSD.org Subject: Re: LOR: filedesc structure -> pipe mutex Message-ID: <20021207043355.GA75597@rot13.obsecurity.org> In-Reply-To: <3DF1686B.6040503@isi.edu> References: <3DF12681.8020008@isi.edu> <20021207022253.GA69717@rot13.obsecurity.org> <3DF1686B.6040503@isi.edu>
next in thread | previous in thread | raw e-mail | index | archive | help
[-- Attachment #1 --]
On Fri, Dec 06, 2002 at 07:18:03PM -0800, Lars Eggert wrote:
> >I'm getting this too:
After discussing this with various people on IRC, it was determined
that this is not the place where the reversal is occurring, but since
witness doesn't have the lock order defined it has to guess, and in
this instance it is guessing the wrong way around. After adding the
lock order to subr_witness.c I now get this:
lock order reversal
1st 0xc41bc418 process lock (process lock) @ /local0/src-client/sys/kern/kern_descrip.c:2094
2nd 0xc42de934 filedesc structure (filedesc structure) @ /local0/src-client/sys/kern/kern_descrip.c:2101
Debugger("witness_lock")
Stopped at Debugger+0x45: xchgl %ebx,in_Debugger.0
db> trace
Debugger(c037a085) at Debugger+0x45
witness_lock(c42de934,8,c039e3cc,835,c41bc418) at witness_lock+0x532
_mtx_lock_flags(c42de934,0,c039e3cc,835,0) at _mtx_lock_flags+0x7f
sysctl_kern_file(c03d8a00,0,0,d7aaac08) at sysctl_kern_file+0x119
sysctl_root(0,d7aaacb4,2,d7aaac08,c0416240) at sysctl_root+0x116
userland_sysctl(c3f84a80,d7aaacb4,2,bfbfe588,bfbff3f8) at userland_sysctl+0xec
__sysctl(c3f84a80,d7aaad14,6,1,297) at __sysctl+0x71
syscall(2f,2f,2f,2,bfbfe588) at syscall+0x211
Xint0x80_syscall() at Xint0x80_syscall+0x1d
--- syscall (202, FreeBSD ELF32, __sysctl), eip = 0x805a717, esp = 0xbfbfe53c, ebp = 0xbfbfe568 ---
db>
Index: sys/kern/subr_witness.c
===================================================================
RCS file: /home/ncvs/src/sys/kern/subr_witness.c,v
retrieving revision 1.130
diff -u -r1.130 subr_witness.c
--- sys/kern/subr_witness.c 11 Nov 2002 16:36:20 -0000 1.130
+++ sys/kern/subr_witness.c 7 Dec 2002 04:18:29 -0000
@@ -198,6 +198,8 @@
{ "Giant", &lock_class_mtx_sleep },
{ "proctree", &lock_class_sx },
{ "allproc", &lock_class_sx },
+ { "filedesc structure", &lock_class_mtx_sleep },
+ { "pipe mutex", &lock_class_mtx_sleep },
{ "sigio lock", &lock_class_mtx_sleep },
{ "process group", &lock_class_mtx_sleep },
{ "process lock", &lock_class_mtx_sleep },
[-- Attachment #2 --]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (FreeBSD)
iD8DBQE98XozWry0BWjoQKURAlHsAKCI6OAGS0iQEZ/WmcK7MIRESsWorwCg/dTo
1j5NBBVAOwL9GfRYfMKGDGg=
=jSlf
-----END PGP SIGNATURE-----
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20021207043355.GA75597>
