diff options
author | Ed Maste <emaste@FreeBSD.org> | 2012-02-13 01:44:12 +0000 |
---|---|---|
committer | Ed Maste <emaste@FreeBSD.org> | 2012-02-13 01:44:12 +0000 |
commit | 1707b4455f0f97f159670e6f7df1cd4449ccde2b (patch) | |
tree | 1c0215b109602526fd0ded212aa2a42a8c7f1f61 /sys/dev/ata | |
parent | e8e848ef8e47b1b574f21306dba5fa1ea4ff9508 (diff) | |
download | src-1707b4455f0f97f159670e6f7df1cd4449ccde2b.tar.gz src-1707b4455f0f97f159670e6f7df1cd4449ccde2b.zip |
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.
Note that this fix applies to the "old" ata(4) and so isn't applicable
to the default configuration in HEAD. It is still applicable to
stable/8.
[1] http://lists.freebsd.org/pipermail/freebsd-current/2012-January/031122.html
Submitted by: Nima Misaghian
Reviewed by: rstone, attilio, mav
Obtained from: SVOS
MFC after: 3 days
Notes
Notes:
svn path=/head/; revision=231573
Diffstat (limited to 'sys/dev/ata')
-rw-r--r-- | sys/dev/ata/ata-queue.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/sys/dev/ata/ata-queue.c b/sys/dev/ata/ata-queue.c index 27fbf7f4792a..a58423be9d7e 100644 --- a/sys/dev/ata/ata-queue.c +++ b/sys/dev/ata/ata-queue.c @@ -112,6 +112,7 @@ ata_queue_request(struct ata_request *request) 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", |