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 [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message

Reply via email to