Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 6 Jul 2001 01:50:03 -0700 (PDT)
From:      Dima Dorfman <dima@unixfreak.org>
To:        freebsd-bugs@FreeBSD.org
Subject:   Re: kern/28736: sysctl -a: kernel trap 12. 
Message-ID:  <200107060850.f668o2n87671@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
The following reply was made to PR kern/28736; it has been noted by GNATS.

From: Dima Dorfman <dima@unixfreak.org>
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 <thomas@cuivre.fr.eu.org> 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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200107060850.f668o2n87671>