From owner-svn-src-head@FreeBSD.ORG Thu Nov 27 03:37:46 2008 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A4FB01065670; Thu, 27 Nov 2008 03:37:46 +0000 (UTC) (envelope-from peter@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A0AF48FC12; Thu, 27 Nov 2008 03:37:46 +0000 (UTC) (envelope-from peter@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mAR3bkxe074790; Thu, 27 Nov 2008 03:37:46 GMT (envelope-from peter@svn.freebsd.org) Received: (from peter@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mAR3bkcR074789; Thu, 27 Nov 2008 03:37:46 GMT (envelope-from peter@svn.freebsd.org) Message-Id: <200811270337.mAR3bkcR074789@svn.freebsd.org> From: Peter Wemm Date: Thu, 27 Nov 2008 03:37:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r185357 - head/sys/dev/ata X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 27 Nov 2008 03:37:46 -0000 Author: peter Date: Thu Nov 27 03:37:46 2008 New Revision: 185357 URL: http://svn.freebsd.org/changeset/base/185357 Log: Don't let ata_completed() dereference a null request->dma pointer to print dma status after a media error. Modified: head/sys/dev/ata/ata-queue.c Modified: head/sys/dev/ata/ata-queue.c ============================================================================== --- head/sys/dev/ata/ata-queue.c Thu Nov 27 02:19:44 2008 (r185356) +++ head/sys/dev/ata/ata-queue.c Thu Nov 27 03:37:46 2008 (r185357) @@ -357,7 +357,7 @@ ata_completed(void *context, int dummy) "\6MEDIA_CHANGED\5NID_NOT_FOUND" "\4MEDIA_CHANGE_REQEST" "\3ABORTED\2NO_MEDIA\1ILLEGAL_LENGTH"); - if ((request->flags & ATA_R_DMA) && + if ((request->flags & ATA_R_DMA) && request->dma && (request->dma->status & ATA_BMSTAT_ERROR)) printf(" dma=0x%02x", request->dma->status); if (!(request->flags & (ATA_R_ATAPI | ATA_R_CONTROL)))