From nobody@FreeBSD.org  Mon Dec 24 15:35:32 2012
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52])
	by hub.freebsd.org (Postfix) with ESMTP id 92C8ECA
	for <freebsd-gnats-submit@FreeBSD.org>; Mon, 24 Dec 2012 15:35:32 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from red.freebsd.org (red.freebsd.org [IPv6:2001:4f8:fff6::22])
	by mx1.freebsd.org (Postfix) with ESMTP id 79A248FC12
	for <freebsd-gnats-submit@FreeBSD.org>; Mon, 24 Dec 2012 15:35:32 +0000 (UTC)
Received: from red.freebsd.org (localhost [127.0.0.1])
	by red.freebsd.org (8.14.5/8.14.5) with ESMTP id qBOFZWRW023724
	for <freebsd-gnats-submit@FreeBSD.org>; Mon, 24 Dec 2012 15:35:32 GMT
	(envelope-from nobody@red.freebsd.org)
Received: (from nobody@localhost)
	by red.freebsd.org (8.14.5/8.14.5/Submit) id qBOFZW3d023723;
	Mon, 24 Dec 2012 15:35:32 GMT
	(envelope-from nobody)
Message-Id: <201212241535.qBOFZW3d023723@red.freebsd.org>
Date: Mon, 24 Dec 2012 15:35:32 GMT
From: Shunsuke Suganuma <3226388001@jcom.home.ne.jp>
To: freebsd-gnats-submit@FreeBSD.org
Subject: 3dm2 (or smartctl) triggers a kernel panic
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         174684
>Category:       kern
>Synopsis:       [tws] [patch] 3dm2 (or smartctl) triggers a kernel panic
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    delphij
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Dec 24 15:40:00 UTC 2012
>Closed-Date:    Fri Mar 14 01:06:49 UTC 2014
>Last-Modified:  Fri Mar 14 01:10:01 UTC 2014
>Originator:     Shunsuke Suganuma
>Release:        9.1-PRERELEASE
>Organization:
>Environment:
9.1-PRERELEASE FreeBSD 9.1-PRERELEASE #1 r244649M: amd64
with LSI 3ware 9750 SAS/SATA Storage Controller
>Description:
3dm2 or smartmontools(smartctl) with 3ware 9750 (tws driver) triggers
a kernel panic, when INVARIANTS/INVARIANT_SUPPORT are set as the kernel
option. 

[3dm2]
installed from ports

[smartmontools]
installed from ports
(For supporting tws, I've modified some of the code based on the info
obtained here: http://sourceforge.net/apps/trac/smartmontools/ticket/236)


Panic example:
<118>root{/}% smartctl -a --device=3ware,0 /dev/tws0
<118>smartctl 6.0 2012-10-10 r3643 [FreeBSD 9.1-PRERELEASE amd64] (local build)
<118>Copyright (C) 2002-12, Bruce Allen, Christian Franke, www.smartmontools.org
<118>
panic: sleepq_signal: invalid NULL wait channel
cpuid = 6
KDB: stack backtrace:
#0 0xffffffff80830bf6 at kdb_backtrace+0x66
#1 0xffffffff807fa558 at panic+0x1d8
#2 0xffffffff8083b1a8 at sleepq_signal+0xf8
#3 0xffffffff80803267 at wakeup_one+0x27
#4 0xffffffff806a907c at tws_ioctl+0x54c
#5 0xffffffff8074f00a at devfs_ioctl_f+0x7a
#6 0xffffffff80844e0f at kern_ioctl+0xcf
#7 0xffffffff8084509d at sys_ioctl+0xfd
#8 0xffffffff80a9e211 at amd64_syscall+0x2d1
#9 0xffffffff80a88d27 at Xfast_syscall+0xf7
Uptime: 5m20s
Dumping 722 out of 16338 MB:..3%..12%..23%..31%..43%..51%..62%..71%..82%..91%

>How-To-Repeat:
1.
build and install the kernel with:
options         INVARIANTS
options         INVARIANT_SUPPORT

2.
install ports/sysutils/3dm 2.11.00.019

3.
run 3dm2 with some appropriate config, then panic.


>Fix:
The following change seems to prevent the panic.
(but I don't know if it's the correct fix for the problem.)


src/sys/dev/tws/tws_user.c:

@L208 in tws_passthru()

[before]
    wakeup_one(sc->chan);

[after]
    if ( sc->chan != NULL ) wakeup_one(sc->chan);


>Release-Note:
>Audit-Trail:

From: Shawn Wallbridge <shawn.wallbridge@imaginaryforces.com>
To: "bug-followup@FreeBSD.org" <bug-followup@FreeBSD.org>,
	"3226388001@jcom.home.ne.jp" <3226388001@jcom.home.ne.jp>
Cc:  
Subject: Re: kern/174684: [tws] [patch] 3dm2 (or smartctl) triggers a kernel
 panic
Date: Fri, 1 Nov 2013 20:38:10 +0000

 This is also effecting me with a 9.2-RELEASE machine.
 
 shawn
 
 
 ________________________________
 
 This e-mail is intended only for the named person or entity to which it is =
 addressed and contains valuable business information that is proprietary, p=
 rivileged, confidential and/or otherwise protected from disclosure. If you =
 received this e-mail in error, any review, use, dissemination, distribution=
  or copying of this e-mail is strictly prohibited. Please notify us immedia=
 tely of the error via e-mail to <ifpostmaster> postmaster@imaginaryforces.c=
 om and please delete the e-mail from your system, retaining no copies in an=
 y media. We appreciate your cooperation.
 
 ...imaginaryforces.com...=0D
 

From: John-Mark Gurney <jmg@funkthat.com>
To: bug-followup@FreeBSD.org, 3226388001@jcom.home.ne.jp
Cc:  
Subject: Re: kern/174684 [tws] [patch] 3dm2 (or smartctl) triggers a kernel panic
Date: Sun, 3 Nov 2013 19:51:53 -0800

 --jCrbxBqMcLqd4mOl
 Content-Type: text/plain; charset=us-ascii
 Content-Disposition: inline
 
 I have a better patch that eliminates the unnecessary chan, and just
 uses sc as the wait channel...  The panic appears due to the fact that
 chan might not be initalized, and running an extra wakeup is not a big
 issue...
 
 If someone could test the patch, I'll commit it..
 
 Thanks.
 
 -- 
   John-Mark Gurney				Voice: +1 415 225 5579
 
      "All that I will do, has been done, All that I have, has not."
 
 --jCrbxBqMcLqd4mOl
 Content-Type: text/x-diff; charset=us-ascii
 Content-Disposition: attachment; filename="tws.patch"
 
 Index: tws.h
 ===================================================================
 --- tws.h	(revision 256870)
 +++ tws.h	(working copy)
 @@ -248,7 +248,6 @@
      struct mtx io_lock;                   /* IO  lock */
      struct tws_ioctl_lock ioctl_lock;     /* ioctl lock */ 
      u_int32_t seq_id;                     /* Sequence id */
 -    void *chan;                           /* IOCTL req wait channel */
      struct tws_circular_q aen_q;          /* aen q */
      struct tws_circular_q trace_q;        /* trace q */
      struct tws_stats stats;               /* I/O stats */
 Index: tws_cam.c
 ===================================================================
 --- tws_cam.c	(revision 256870)
 +++ tws_cam.c	(working copy)
 @@ -1297,7 +1297,7 @@
  
      tws_turn_on_interrupts(sc);
  
 -    wakeup_one(sc->chan);
 +    wakeup_one(sc);
  }
  
  
 Index: tws_user.c
 ===================================================================
 --- tws_user.c	(revision 256870)
 +++ tws_user.c	(working copy)
 @@ -103,8 +103,7 @@
      do {
          req = tws_get_request(sc, TWS_REQ_TYPE_PASSTHRU);
          if ( !req ) {
 -            sc->chan = (void *)sc;
 -            error = tsleep(sc->chan,  0, "tws_sleep", TWS_IOCTL_TIMEOUT*hz);
 +            error = tsleep(sc,  0, "tws_sleep", TWS_IOCTL_TIMEOUT*hz);
              if ( error == EWOULDBLOCK ) {
                  return(ETIMEDOUT);
              }
 @@ -203,7 +202,7 @@
      //
      req->state = TWS_REQ_STATE_FREE;
  
 -    wakeup_one(sc->chan);
 +    wakeup_one(sc);
  
      return(error);
  }
 
 --jCrbxBqMcLqd4mOl--

From: Shawn Wallbridge <shawn.wallbridge@imaginaryforces.com>
To: "bug-followup@FreeBSD.org" <bug-followup@FreeBSD.org>,
	"3226388001@jcom.home.ne.jp" <3226388001@jcom.home.ne.jp>
Cc:  
Subject: Re: kern/174684: [tws] [patch] 3dm2 (or smartctl) triggers a kernel
 panic
Date: Mon, 4 Nov 2013 22:50:04 +0000

 I can confirm that this patch fixes the problem.
 
 Thank you!
 
 shawn
 
 
 ________________________________
 
 This e-mail is intended only for the named person or entity to which it is =
 addressed and contains valuable business information that is proprietary, p=
 rivileged, confidential and/or otherwise protected from disclosure. If you =
 received this e-mail in error, any review, use, dissemination, distribution=
  or copying of this e-mail is strictly prohibited. Please notify us immedia=
 tely of the error via e-mail to <ifpostmaster> postmaster@imaginaryforces.c=
 om and please delete the e-mail from your system, retaining no copies in an=
 y media. We appreciate your cooperation.
 
 ...imaginaryforces.com...=0D
 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: kern/174684: commit references a PR
Date: Thu, 27 Feb 2014 21:42:06 +0000 (UTC)

 Author: delphij
 Date: Thu Feb 27 21:41:52 2014
 New Revision: 262572
 URL: http://svnweb.freebsd.org/changeset/base/262572
 
 Log:
   Get rid of the 'chan' from softc structure and use the latter
   directly as sleep channel.
   
   PR:		kern/174684
   Submitted by:	jmg
   MFC after:	2 weeks
 
 Modified:
   head/sys/dev/tws/tws.h
   head/sys/dev/tws/tws_cam.c
   head/sys/dev/tws/tws_user.c
 
 Modified: head/sys/dev/tws/tws.h
 ==============================================================================
 --- head/sys/dev/tws/tws.h	Thu Feb 27 21:01:10 2014	(r262571)
 +++ head/sys/dev/tws/tws.h	Thu Feb 27 21:41:52 2014	(r262572)
 @@ -248,7 +248,6 @@ struct tws_softc {
      struct mtx io_lock;                   /* IO  lock */
      struct tws_ioctl_lock ioctl_lock;     /* ioctl lock */ 
      u_int32_t seq_id;                     /* Sequence id */
 -    void *chan;                           /* IOCTL req wait channel */
      struct tws_circular_q aen_q;          /* aen q */
      struct tws_circular_q trace_q;        /* trace q */
      struct tws_stats stats;               /* I/O stats */
 
 Modified: head/sys/dev/tws/tws_cam.c
 ==============================================================================
 --- head/sys/dev/tws/tws_cam.c	Thu Feb 27 21:01:10 2014	(r262571)
 +++ head/sys/dev/tws/tws_cam.c	Thu Feb 27 21:41:52 2014	(r262572)
 @@ -1297,7 +1297,7 @@ tws_reinit(void *arg)
  
      tws_turn_on_interrupts(sc);
  
 -    wakeup_one(sc->chan);
 +    wakeup_one(sc);
  }
  
  
 
 Modified: head/sys/dev/tws/tws_user.c
 ==============================================================================
 --- head/sys/dev/tws/tws_user.c	Thu Feb 27 21:01:10 2014	(r262571)
 +++ head/sys/dev/tws/tws_user.c	Thu Feb 27 21:41:52 2014	(r262572)
 @@ -103,8 +103,7 @@ tws_passthru(struct tws_softc *sc, void 
      do {
          req = tws_get_request(sc, TWS_REQ_TYPE_PASSTHRU);
          if ( !req ) {
 -            sc->chan = (void *)sc;
 -            error = tsleep(sc->chan,  0, "tws_sleep", TWS_IOCTL_TIMEOUT*hz);
 +            error = tsleep(sc,  0, "tws_sleep", TWS_IOCTL_TIMEOUT*hz);
              if ( error == EWOULDBLOCK ) {
                  return(ETIMEDOUT);
              }
 @@ -203,7 +202,7 @@ out_data:
      //
      req->state = TWS_REQ_STATE_FREE;
  
 -    wakeup_one(sc->chan);
 +    wakeup_one(sc);
  
      return(error);
  }
 _______________________________________________
 svn-src-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/svn-src-all
 To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"
 
State-Changed-From-To: open->patched 
State-Changed-By: delphij 
State-Changed-When: Thu Feb 27 22:56:27 UTC 2014 
State-Changed-Why:  
Committed jmg@'s fix. 


Responsible-Changed-From-To: freebsd-bugs->delphij 
Responsible-Changed-By: delphij 
Responsible-Changed-When: Thu Feb 27 22:56:27 UTC 2014 
Responsible-Changed-Why:  
Take. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=174684 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: kern/174684: commit references a PR
Date: Fri, 14 Mar 2014 00:57:40 +0000 (UTC)

 Author: delphij
 Date: Fri Mar 14 00:57:32 2014
 New Revision: 263125
 URL: http://svnweb.freebsd.org/changeset/base/263125
 
 Log:
   MFC r262572:
   
   Get rid of the 'chan' from softc structure and use the latter
   directly as sleep channel.
   
   PR:		kern/174684
   Submitted by:	jmg
 
 Modified:
   stable/10/sys/dev/tws/tws.h
   stable/10/sys/dev/tws/tws_cam.c
   stable/10/sys/dev/tws/tws_user.c
 Directory Properties:
   stable/10/   (props changed)
 
 Modified: stable/10/sys/dev/tws/tws.h
 ==============================================================================
 --- stable/10/sys/dev/tws/tws.h	Fri Mar 14 00:49:02 2014	(r263124)
 +++ stable/10/sys/dev/tws/tws.h	Fri Mar 14 00:57:32 2014	(r263125)
 @@ -248,7 +248,6 @@ struct tws_softc {
      struct mtx io_lock;                   /* IO  lock */
      struct tws_ioctl_lock ioctl_lock;     /* ioctl lock */ 
      u_int32_t seq_id;                     /* Sequence id */
 -    void *chan;                           /* IOCTL req wait channel */
      struct tws_circular_q aen_q;          /* aen q */
      struct tws_circular_q trace_q;        /* trace q */
      struct tws_stats stats;               /* I/O stats */
 
 Modified: stable/10/sys/dev/tws/tws_cam.c
 ==============================================================================
 --- stable/10/sys/dev/tws/tws_cam.c	Fri Mar 14 00:49:02 2014	(r263124)
 +++ stable/10/sys/dev/tws/tws_cam.c	Fri Mar 14 00:57:32 2014	(r263125)
 @@ -1297,7 +1297,7 @@ tws_reinit(void *arg)
  
      tws_turn_on_interrupts(sc);
  
 -    wakeup_one(sc->chan);
 +    wakeup_one(sc);
  }
  
  
 
 Modified: stable/10/sys/dev/tws/tws_user.c
 ==============================================================================
 --- stable/10/sys/dev/tws/tws_user.c	Fri Mar 14 00:49:02 2014	(r263124)
 +++ stable/10/sys/dev/tws/tws_user.c	Fri Mar 14 00:57:32 2014	(r263125)
 @@ -103,8 +103,7 @@ tws_passthru(struct tws_softc *sc, void 
      do {
          req = tws_get_request(sc, TWS_REQ_TYPE_PASSTHRU);
          if ( !req ) {
 -            sc->chan = (void *)sc;
 -            error = tsleep(sc->chan,  0, "tws_sleep", TWS_IOCTL_TIMEOUT*hz);
 +            error = tsleep(sc,  0, "tws_sleep", TWS_IOCTL_TIMEOUT*hz);
              if ( error == EWOULDBLOCK ) {
                  return(ETIMEDOUT);
              }
 @@ -203,7 +202,7 @@ out_data:
      //
      req->state = TWS_REQ_STATE_FREE;
  
 -    wakeup_one(sc->chan);
 +    wakeup_one(sc);
  
      return(error);
  }
 _______________________________________________
 svn-src-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/svn-src-all
 To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"
 
State-Changed-From-To: patched->closed 
State-Changed-By: delphij 
State-Changed-When: Fri Mar 14 01:06:36 UTC 2014 
State-Changed-Why:  
Patch from jmg@ committed, thanks! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=174684 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: kern/174684: commit references a PR
Date: Fri, 14 Mar 2014 01:05:40 +0000 (UTC)

 Author: delphij
 Date: Fri Mar 14 01:05:32 2014
 New Revision: 263126
 URL: http://svnweb.freebsd.org/changeset/base/263126
 
 Log:
   MFC r262572:
   
   Get rid of the 'chan' from softc structure and use the latter
   directly as sleep channel.
   
   PR:		kern/174684
   Submitted by:	jmg
 
 Modified:
   stable/9/sys/dev/tws/tws.h
   stable/9/sys/dev/tws/tws_cam.c
   stable/9/sys/dev/tws/tws_user.c
 Directory Properties:
   stable/9/sys/   (props changed)
   stable/9/sys/dev/   (props changed)
 
 Changes in other areas also in this revision:
 Modified:
   stable/8/sys/dev/tws/tws.h
   stable/8/sys/dev/tws/tws_cam.c
   stable/8/sys/dev/tws/tws_user.c
 Directory Properties:
   stable/8/sys/   (props changed)
   stable/8/sys/dev/   (props changed)
   stable/8/sys/dev/tws/   (props changed)
 
 Modified: stable/9/sys/dev/tws/tws.h
 ==============================================================================
 --- stable/9/sys/dev/tws/tws.h	Fri Mar 14 00:57:32 2014	(r263125)
 +++ stable/9/sys/dev/tws/tws.h	Fri Mar 14 01:05:32 2014	(r263126)
 @@ -248,7 +248,6 @@ struct tws_softc {
      struct mtx io_lock;                   /* IO  lock */
      struct tws_ioctl_lock ioctl_lock;     /* ioctl lock */ 
      u_int32_t seq_id;                     /* Sequence id */
 -    void *chan;                           /* IOCTL req wait channel */
      struct tws_circular_q aen_q;          /* aen q */
      struct tws_circular_q trace_q;        /* trace q */
      struct tws_stats stats;               /* I/O stats */
 
 Modified: stable/9/sys/dev/tws/tws_cam.c
 ==============================================================================
 --- stable/9/sys/dev/tws/tws_cam.c	Fri Mar 14 00:57:32 2014	(r263125)
 +++ stable/9/sys/dev/tws/tws_cam.c	Fri Mar 14 01:05:32 2014	(r263126)
 @@ -1298,7 +1298,7 @@ tws_reinit(void *arg)
  
      tws_turn_on_interrupts(sc);
  
 -    wakeup_one(sc->chan);
 +    wakeup_one(sc);
  }
  
  
 
 Modified: stable/9/sys/dev/tws/tws_user.c
 ==============================================================================
 --- stable/9/sys/dev/tws/tws_user.c	Fri Mar 14 00:57:32 2014	(r263125)
 +++ stable/9/sys/dev/tws/tws_user.c	Fri Mar 14 01:05:32 2014	(r263126)
 @@ -105,8 +105,7 @@ tws_passthru(struct tws_softc *sc, void 
      do {
          req = tws_get_request(sc, TWS_REQ_TYPE_PASSTHRU);
          if ( !req ) {
 -            sc->chan = (void *)sc;
 -            error = tsleep(sc->chan,  0, "tws_sleep", TWS_IOCTL_TIMEOUT*hz);
 +            error = tsleep(sc,  0, "tws_sleep", TWS_IOCTL_TIMEOUT*hz);
              if ( error == EWOULDBLOCK ) {
                  return(ETIMEDOUT);
              }
 @@ -205,7 +204,7 @@ out_data:
      //
      req->state = TWS_REQ_STATE_FREE;
  
 -    wakeup_one(sc->chan);
 +    wakeup_one(sc);
  
      return(error);
  }
 _______________________________________________
 svn-src-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/svn-src-all
 To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"
 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: kern/174684: commit references a PR
Date: Fri, 14 Mar 2014 01:05:47 +0000 (UTC)

 Author: delphij
 Date: Fri Mar 14 01:05:32 2014
 New Revision: 263126
 URL: http://svnweb.freebsd.org/changeset/base/263126
 
 Log:
   MFC r262572:
   
   Get rid of the 'chan' from softc structure and use the latter
   directly as sleep channel.
   
   PR:		kern/174684
   Submitted by:	jmg
 
 Modified:
   stable/8/sys/dev/tws/tws.h
   stable/8/sys/dev/tws/tws_cam.c
   stable/8/sys/dev/tws/tws_user.c
 Directory Properties:
   stable/8/sys/   (props changed)
   stable/8/sys/dev/   (props changed)
   stable/8/sys/dev/tws/   (props changed)
 
 Changes in other areas also in this revision:
 Modified:
   stable/9/sys/dev/tws/tws.h
   stable/9/sys/dev/tws/tws_cam.c
   stable/9/sys/dev/tws/tws_user.c
 Directory Properties:
   stable/9/sys/   (props changed)
   stable/9/sys/dev/   (props changed)
 
 Modified: stable/8/sys/dev/tws/tws.h
 ==============================================================================
 --- stable/8/sys/dev/tws/tws.h	Fri Mar 14 00:57:32 2014	(r263125)
 +++ stable/8/sys/dev/tws/tws.h	Fri Mar 14 01:05:32 2014	(r263126)
 @@ -247,7 +247,6 @@ struct tws_softc {
      struct mtx io_lock;                   /* IO  lock */
      struct tws_ioctl_lock ioctl_lock;     /* ioctl lock */ 
      u_int32_t seq_id;                     /* Sequence id */
 -    void *chan;                           /* IOCTL req wait channel */
      struct tws_circular_q aen_q;          /* aen q */
      struct tws_circular_q trace_q;        /* trace q */
      struct tws_stats stats;               /* I/O stats */
 
 Modified: stable/8/sys/dev/tws/tws_cam.c
 ==============================================================================
 --- stable/8/sys/dev/tws/tws_cam.c	Fri Mar 14 00:57:32 2014	(r263125)
 +++ stable/8/sys/dev/tws/tws_cam.c	Fri Mar 14 01:05:32 2014	(r263126)
 @@ -1323,7 +1323,7 @@ tws_reinit(void *arg)
  
      tws_turn_on_interrupts(sc);
  
 -    wakeup_one(sc->chan);
 +    wakeup_one(sc);
  }
  
  
 
 Modified: stable/8/sys/dev/tws/tws_user.c
 ==============================================================================
 --- stable/8/sys/dev/tws/tws_user.c	Fri Mar 14 00:57:32 2014	(r263125)
 +++ stable/8/sys/dev/tws/tws_user.c	Fri Mar 14 01:05:32 2014	(r263126)
 @@ -105,8 +105,7 @@ tws_passthru(struct tws_softc *sc, void 
      do {
          req = tws_get_request(sc, TWS_REQ_TYPE_PASSTHRU);
          if ( !req ) {
 -            sc->chan = (void *)sc;
 -            error = tsleep(sc->chan,  0, "tws_sleep", TWS_IOCTL_TIMEOUT*hz);
 +            error = tsleep(sc,  0, "tws_sleep", TWS_IOCTL_TIMEOUT*hz);
              if ( error == EWOULDBLOCK ) {
                  return(ETIMEDOUT);
              }
 @@ -205,7 +204,7 @@ out_data:
      //
      req->state = TWS_REQ_STATE_FREE;
  
 -    wakeup_one(sc->chan);
 +    wakeup_one(sc);
  
      return(error);
  }
 _______________________________________________
 svn-src-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/svn-src-all
 To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"
 
>Unformatted:
