Re: Kernel Panics on IDE Initialization

Vojtech Pavlik (vojtech@suse.cz)
Sat, 2 Mar 2002 13:03:53 +0100


--HcAYCG3uE/tztfnV
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

On Fri, Mar 01, 2002 at 08:56:59PM +0000, Alan Cox wrote:
> > I have word that it's the HighPoint controller's fault. I will verify
> > this myself and let you know.
>
> Ok

I have many reports the HPT RAID controllers cause kernels (RH 7.3
install) to crash, unfortunately because the VIA IDE spits an unrelated
warning message on many of the affected mainboards just before the HPT
code crashes ...

Well, this patch fixes two possible array overflows in the HPT code.
There is quite likely a lot more of stuff to fix.

-- 
Vojtech Pavlik
SuSE Labs

--HcAYCG3uE/tztfnV Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="hpt366fixes.diff"

--- hpt366.c Thu Jan 31 16:45:20 2002 +++ hpt366.c.new Sat Mar 2 13:00:16 2002 @@ -375,7 +375,8 @@ class_rev &= 0xff; p += sprintf(p, "\nController: %d\n", i); - p += sprintf(p, "Chipset: HPT%s\n", chipset_nums[class_rev]); + p += sprintf(p, "Chipset: HPT%s\n", + class_rev < sizeof(chipset_nums) / sizeof(char *) ? chipset_nums[class_rev] : "???"); p += sprintf(p, "--------------- Primary Channel " "--------------- Secondary Channel " "--------------\n"); @@ -1120,12 +1121,11 @@ if (test != 0x08) pci_write_config_byte(dev, PCI_MAX_LAT, 0x08); - if (pci_rev_check_hpt3xx(dev)) { + if (pci_rev_check_hpt3xx(dev)) init_hpt370(dev); + + if (n_hpt_devs < HPT366_MAX_DEVS) hpt_devs[n_hpt_devs++] = dev; - } else { - hpt_devs[n_hpt_devs++] = dev; - } #if defined(DISPLAY_HPT366_TIMINGS) && defined(CONFIG_PROC_FS) if (!hpt366_proc) {

--HcAYCG3uE/tztfnV-- - 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/