Re: Linux 2.5.44-ac1

From: Jason Williams (jason_williams@suth.com)
Date: Wed Oct 23 2002 - 06:39:35 EST


On Tue, 2002-10-22 at 13:27, Alan Cox wrote:
> ** I strongly recommend saying N to IDE TCQ options otherwise this
> should hopefully build and run happily.

I don't have the IDE TCQ options on and am still having an issue with a
kernel oops in the default kernel code. I did some digging after I
noticed it in 2.5.43 and found a possibility for a null pointer in the
code within the ide_iomio_dma function in ide-dma.c The problem shows
itself if you only enable the secondary channel of your IDE controller.
I understand this is a strange set up, but it could happen in a machine
that boots off of SCSI and uses IDE disks for DATA or a CD Burner. I
came up with a fix, some extra sanity checks before this line in the
code:

hwif->dma_master = (hwif->channel) ? hwif->mate->dma_base : base;

Because it is the hwif->mate variable that is null when it gets here and
if hwif->channel is not 0 I am taking it from the logic on this line
that hwif->mate should not be a null variable. So I applied the sainity
checks in the attached patch and this seems to work. I did this against
the 2.5.43 and 2.5.44 kernels, and have posted patches for each of them
but no one seems interested. If I am completely off base here, just let
me know and I'll go back to the code and look for a different way to
conquer this little bug.

Jason



-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Wed Oct 23 2002 - 22:01:03 EST