Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 9 Oct 2012 19:57:18 +0000 (UTC)
From:      Jim Harris <jimharris@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
Subject:   svn commit: r241381 - stable/8/sys/dev/tws
Message-ID:  <201210091957.q99JvILD067131@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: jimharris
Date: Tue Oct  9 19:57:18 2012
New Revision: 241381
URL: http://svn.freebsd.org/changeset/base/241381

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/8/sys/dev/tws/tws.c
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/dev/   (props changed)
  stable/8/sys/dev/tws/   (props changed)

Modified: stable/8/sys/dev/tws/tws.c
==============================================================================
--- stable/8/sys/dev/tws/tws.c	Tue Oct  9 19:55:12 2012	(r241380)
+++ stable/8/sys/dev/tws/tws.c	Tue Oct  9 19:57:18 2012	(r241381)
@@ -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?201210091957.q99JvILD067131>