5 Dec 2011 16:23
panic mutex
KIYOHARA Takashi <kiyohara <at> kk.iij4u.or.jp>
2011-12-05 15:23:17 GMT
2011-12-05 15:23:17 GMT
Hi! all,
I encounter a (compiler?) bug?
My bebox panics on mutex_enter() in joyattach().
mtxm_owner (or mtxp_a) is initialized in mutex_init(). However, it
becomes dirty when seting the address to sc->sc_lock.
Index: joy_isa.c
===================================================================
RCS file: /cvsroot/src/sys/dev/isa/joy_isa.c,v
retrieving revision 1.13
diff -u -r1.13 joy_isa.c
--- joy_isa.c 23 Nov 2011 23:07:32 -0000 1.13
+++ joy_isa.c 5 Dec 2011 14:57:28 -0000
<at> <at> -117,7 +117,10 <at> <at>
}
mutex_init(&isc->sc_lock, MUTEX_DEFAULT, IPL_NONE);
+printf("%s: mutex=%d, 0x%x, 0x%x, 0x%x\n", __func__, sizeof(isc->sc_lock),
isc->sc_lock.u.p.mtxp_a, isc->sc_lock.u.p.mtxp_b[0], isc->sc_lock.u.p.mtxp_b[1]);
sc->sc_lock = &isc->sc_lock;
+printf("%s: Re: sc mutex=%p, 0x%x, 0x%x, 0x%x\n", __func__, sc->sc_lock, sc->sc_lock->u.p.mtxp_a,
sc->sc_lock->u.p.mtxp_b[0], sc->sc_lock->u.p.mtxp_b[1]);
+printf("%s: Re: isc mutex=%p, 0x%x, 0x%x, 0x%x\n", __func__, &isc->sc_lock,
isc->sc_lock.u.p.mtxp_a, isc->sc_lock.u.p.mtxp_b[0], isc->sc_lock.u.p.mtxp_b[1]);
joyattach(sc);
}
joy_isa_attach: mutex=12, 0x0, 0x0, 0x0
(Continue reading)
RSS Feed