svn commit: r241379 - stable/9/sys/dev/tws

Jim Harris jimharris at FreeBSD.org
Tue Oct 9 19:53:16 UTC 2012


Author: jimharris
Date: Tue Oct  9 19:53:15 2012
New Revision: 241379
URL: http://svn.freebsd.org/changeset/base/241379

Log:
  MFC r240900:
  
  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 path
  is always recursing on this lock.

Modified:
  stable/9/sys/dev/tws/tws.c
Directory Properties:
  stable/9/sys/   (props changed)
  stable/9/sys/dev/   (props changed)

Modified: stable/9/sys/dev/tws/tws.c
==============================================================================
--- stable/9/sys/dev/tws/tws.c	Tue Oct  9 18:45:08 2012	(r241378)
+++ stable/9/sys/dev/tws/tws.c	Tue Oct  9 19:53:15 2012	(r241379)
@@ -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");


More information about the svn-src-stable-9 mailing list