Specify MTX_RECURSE for the controller's io_lock. Without it, tws(4)

immediately panics on boot with INVARIANTS enabled.  The driver already
clearly expects to be able to recurse on this mutex - the main I/O
is always recursing on this lock.

Reported and tested by:  Mike Tancsa <mike at sentex dot net>
MFC after: 1 week
This commit is contained in:
jimharris 2012-09-24 21:40:22 +00:00
parent d870dd946f
commit 9d75de6934

View File

@ -197,7 +197,7 @@ tws_attach(device_t dev)
mtx_init( &sc->q_lock, "tws_q_lock", NULL, MTX_DEF);
mtx_init( &sc->sim_lock, "tws_sim_lock", NULL, MTX_DEF);
mtx_init( &sc->gen_lock, "tws_gen_lock", NULL, MTX_DEF);
mtx_init( &sc->io_lock, "tws_io_lock", NULL, MTX_DEF);
mtx_init( &sc->io_lock, "tws_io_lock", NULL, MTX_DEF | MTX_RECURSE);
if ( tws_init_trace_q(sc) == FAILURE )
printf("trace init failure\n");