Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 16 Feb 2012 00:38:35 +0000 (UTC)
From:      Ed Maste <emaste@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: r231800 - stable/8/sys/dev/ata
Message-ID:  <201202160038.q1G0cZrl089927@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: emaste
Date: Thu Feb 16 00:38:35 2012
New Revision: 231800
URL: http://svn.freebsd.org/changeset/base/231800

Log:
  MFC r231573:
  
    Fix panic after "WARNING - ATA_IDENTIFY taskqueue timeout"
  
    When performing a firmware upgrade via atacontrol[1] the subsequent
    command may time out producing the error message above.  When this
    happens the callout could still be active, and the system would then
    panic due to a destroyed semaphore.
  
    Instead, ensure that the callout is done first, via callout_drain.
  
    [1] http://lists.freebsd.org/pipermail/freebsd-current/2012-January/031122.html

Modified:
  stable/8/sys/dev/ata/ata-queue.c
Directory Properties:
  stable/8/sys/   (props changed)

Modified: stable/8/sys/dev/ata/ata-queue.c
==============================================================================
--- stable/8/sys/dev/ata/ata-queue.c	Thu Feb 16 00:25:17 2012	(r231799)
+++ stable/8/sys/dev/ata/ata-queue.c	Thu Feb 16 00:38:35 2012	(r231800)
@@ -112,6 +112,7 @@ ata_queue_request(struct ata_request *re
 	ATA_DEBUG_RQ(request, "wait for completion");
 	if (!dumping &&
 	    sema_timedwait(&request->done, request->timeout * hz * 4)) {
+	    callout_drain(&request->callout);
 	    device_printf(request->dev,
 			  "WARNING - %s taskqueue timeout "
 			  "- completing request directly\n",



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