From owner-freebsd-bugs Fri Jul 6 1:50:10 2001 Delivered-To: freebsd-bugs@hub.freebsd.org Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 1B62837B406 for ; Fri, 6 Jul 2001 01:50:03 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.11.3/8.11.3) id f668o2n87671; Fri, 6 Jul 2001 01:50:03 -0700 (PDT) (envelope-from gnats) Date: Fri, 6 Jul 2001 01:50:03 -0700 (PDT) Message-Id: <200107060850.f668o2n87671@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org Cc: From: Dima Dorfman Subject: Re: kern/28736: sysctl -a: kernel trap 12. Reply-To: Dima Dorfman Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org The following reply was made to PR kern/28736; it has been noted by GNATS. From: Dima Dorfman To: thomas@cuivre.fr.eu.org Cc: FreeBSD-gnats-submit@freebsd.org, ernst@jollem.com Subject: Re: kern/28736: sysctl -a: kernel trap 12. Date: Fri, 06 Jul 2001 01:41:29 -0700 [ Ernst, I'm cc'ing you regarding PR 24596; I'd like you to try the patch attached below and see if it helps that problem. ] Thomas Quinot writes: > Le 2001-07-06, Dima Dorfman écrivait : > > > > Running 'sysctl -a' reproduceably causes a null pointer dereference > > > in kernel: > > This was only broken for a period of about a day and a half. Upgrade > > to a more recent -stable. > > I cvsupped to today's -stalbe, remade kernel and reproduced the crash. > Is a 'make world' required as well? > > (also note that this is not the same problem as PR misc/27706, > if that's the one you were referring to: here we're having > a kernel trap 12, not a freeze.) Okay, I read your PR too fast; it is indeed a different problem. You are right, this is related to cd0 not being present. The CAM code doesn't properly clean up after itself in this case (or so I think). If you can reproduce the problem, please try the patch below and see if it helps (and you should be able to reproduce it). Thanks, Dima Dorfman dima@unixfreak.org Index: scsi_cd.c =================================================================== RCS file: /stl/src/FreeBSD/src/sys/cam/scsi/scsi_cd.c,v retrieving revision 1.51 diff -u -r1.51 scsi_cd.c --- scsi_cd.c 2001/05/08 08:30:47 1.51 +++ scsi_cd.c 2001/07/06 08:40:55 @@ -487,6 +487,9 @@ } devstat_remove_entry(&softc->device_stats); cam_extend_release(cdperiphs, periph->unit_number); + if (softc->dev) { + disk_destroy(softc->dev); + } free(softc, M_DEVBUF); splx(s); } To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message