linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Vojtech Pavlik <vojtech@suse.cz>
To: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: Kristopher Kersey <augustus@linuxhardware.org>,
	Andre Hedrick <andre@linuxdiskcert.org>,
	Martin Dalecki <dalecki@evision-ventures.com>,
	linux-kernel@vger.kernel.org, linux-ide@vger.kernel.org
Subject: Re: Kernel Panics on IDE Initialization
Date: Sat, 2 Mar 2002 13:03:53 +0100	[thread overview]
Message-ID: <20020302130353.A24918@ucw.cz> (raw)
In-Reply-To: <Pine.LNX.4.33.0203011521450.23902-100000@penguin.linuxhardware.org> <E16gu5L-000501-00@the-village.bc.nu>
In-Reply-To: <E16gu5L-000501-00@the-village.bc.nu>; from alan@lxorguk.ukuu.org.uk on Fri, Mar 01, 2002 at 08:56:59PM +0000

[-- Attachment #1: Type: text/plain, Size: 553 bytes --]

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

[-- Attachment #2: hpt366fixes.diff --]
[-- Type: text/plain, Size: 878 bytes --]

--- 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) {

  parent reply	other threads:[~2002-03-02 12:04 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-02-28  4:34 Kernel Panics on IDE Initialization Kristopher Kersey
2002-03-01  1:22 ` Alan Cox
2002-03-01  3:49   ` Kristopher Kersey
2002-03-01  9:33     ` Martin Dalecki
2002-03-01 11:39       ` Andre Hedrick
2002-03-01 20:22         ` Kristopher Kersey
2002-03-01 20:56           ` Alan Cox
2002-03-02  0:17             ` Andre Hedrick
2002-03-02  4:47               ` Kristopher Kersey
2002-03-02 12:03             ` Vojtech Pavlik [this message]
2002-03-18 17:13               ` Kristopher Kersey

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20020302130353.A24918@ucw.cz \
    --to=vojtech@suse.cz \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=andre@linuxdiskcert.org \
    --cc=augustus@linuxhardware.org \
    --cc=dalecki@evision-ventures.com \
    --cc=linux-ide@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).