From owner-freebsd-current Fri Dec 6 10:23:45 2002 Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B76EB37B401; Fri, 6 Dec 2002 10:23:43 -0800 (PST) Received: from duke.cs.duke.edu (duke.cs.duke.edu [152.3.140.1]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8CCA943E4A; Fri, 6 Dec 2002 10:23:39 -0800 (PST) (envelope-from gallatin@cs.duke.edu) Received: from grasshopper.cs.duke.edu (grasshopper.cs.duke.edu [152.3.145.30]) by duke.cs.duke.edu (8.9.3/8.9.3) with ESMTP id NAA05767; Fri, 6 Dec 2002 13:23:33 -0500 (EST) Received: (from gallatin@localhost) by grasshopper.cs.duke.edu (8.11.6/8.9.1) id gB6IN3I95694; Fri, 6 Dec 2002 13:23:03 -0500 (EST) (envelope-from gallatin@cs.duke.edu) From: Andrew Gallatin MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <15856.60167.577649.503653@grasshopper.cs.duke.edu> Date: Fri, 6 Dec 2002 13:23:03 -0500 (EST) To: Kris Kennaway Cc: sos@FreeBSD.org, current@FreeBSD.org Subject: Re: Another INVARIANTS panic with ata driver In-Reply-To: <20021206173408.GA55574@rot13.obsecurity.org> References: <20021206173408.GA55574@rot13.obsecurity.org> X-Mailer: VM 6.75 under 21.1 (patch 12) "Channel Islands" XEmacs Lucid Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Kris Kennaway writes: > I got this on one of the gohan machines overnight. These machines > have failing disks -- I get a lot of hard read errors, but the > INVARIANTS panic could better be replaced by something else. > > I reported another instance of this to sos a few weeks ago but didn't > hear a reply. > I posted a patch for this earlier this week. No reply from sos yet. Try the following patch (its against stable but should work on current). The problem is that ata_raiddisk_attach fails, causing the adp to be freed, so ad_print is called with a bogus pointer. adp is an alias fro atadev->driver, so checking that atadev->driver != NULL is one way to fix this panic. Drew Index: ata-disk.c =================================================================== RCS file: /home/ncvs/src/sys/dev/ata/ata-disk.c,v retrieving revision 1.60.2.23 diff -u -r1.60.2.23 ata-disk.c --- ata-disk.c 30 May 2002 11:42:13 -0000 1.60.2.23 +++ ata-disk.c 4 Dec 2002 16:16:59 -0000 @@ -217,8 +217,9 @@ /* if this disk belongs to an ATA RAID dont print the probe */ if (ata_raiddisk_attach(adp)) adp->flags |= AD_F_RAID_SUBDISK; - else - ad_print(adp); + else if (atadev->driver != NULL) + ad_print(atadev->driver); + } void To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message