Date: Sat, 07 Aug 2004 00:33:06 +0200 From: =?ISO-8859-1?Q?S=F8ren_Schmidt?= <sos@DeepCore.dk> To: Nate Lawson <nate@root.org> Cc: Radek Kozlowski <radek@raadradd.com> Subject: Re: Panic on boot with today's CURRENT, ata related Message-ID: <41140722.10807@DeepCore.dk> In-Reply-To: <4113EB2A.7060401@root.org> References: <4113EB2A.7060401@root.org>
next in thread | previous in thread | raw e-mail | index | archive | help
Nate Lawson wrote: > I took a quick look at this ATA panic. The exact same one occurs for > Ceri. A quick dissassemble shows that the testb is the check for the > DMA flag at the very end of ata_generic_transaction(). The bug appears > to be that this may be a PIO request (since the DMA check is outside the > switch() statement). The fix is to make sure it's a DMA request before > dereferencing an element of the DMA struct. Try the attached patch. No, the fix is to make sure there is a valid ch->dma pointer, the below is the correct fix. --- ata-lowlevel.c 5 Aug 2004 21:13:41 -0000 1.41 +++ ata-lowlevel.c 6 Aug 2004 22:31:16 -0000 @@ -295,7 +295,7 @@ } /* request finish here */ - if (ch->dma->flags & ATA_DMA_LOADED) + if (ch->dma && ch->dma->flags & ATA_DMA_LOADED) ch->dma->unload(ch); return ATA_OP_FINISHED; }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?41140722.10807>