lkml.org 
[lkml]   [2002]   [Mar]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: Kernel Panics on IDE Initialization
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
--- 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) {
\
 
 \ /
  Last update: 2005-03-22 13:24    [from the cache]
©2003-2011 Jasper Spaans