Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 24 Sep 2012 21:40:22 +0000 (UTC)
From:      Jim Harris <jimharris@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r240900 - head/sys/dev/tws
Message-ID:  <201209242140.q8OLeM8j005379@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: jimharris
Date: Mon Sep 24 21:40:22 2012
New Revision: 240900
URL: http://svn.freebsd.org/changeset/base/240900

Log:
  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

Modified:
  head/sys/dev/tws/tws.c

Modified: head/sys/dev/tws/tws.c
==============================================================================
--- head/sys/dev/tws/tws.c	Mon Sep 24 20:35:56 2012	(r240899)
+++ head/sys/dev/tws/tws.c	Mon Sep 24 21:40:22 2012	(r240900)
@@ -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");



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201209242140.q8OLeM8j005379>