Date: Fri, 6 Dec 2002 13:23:03 -0500 (EST) From: Andrew Gallatin <gallatin@cs.duke.edu> To: Kris Kennaway <kris@obsecurity.org> Cc: sos@FreeBSD.org, current@FreeBSD.org Subject: Re: Another INVARIANTS panic with ata driver Message-ID: <15856.60167.577649.503653@grasshopper.cs.duke.edu> In-Reply-To: <20021206173408.GA55574@rot13.obsecurity.org> References: <20021206173408.GA55574@rot13.obsecurity.org>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?15856.60167.577649.503653>