From owner-freebsd-current Sun Jan 13 3:37: 4 2002 Delivered-To: freebsd-current@freebsd.org Received: from mailman.zeta.org.au (mailman.zeta.org.au [203.26.10.16]) by hub.freebsd.org (Postfix) with ESMTP id 67B5C37B417 for ; Sun, 13 Jan 2002 03:36:59 -0800 (PST) Received: from bde.zeta.org.au (bde.zeta.org.au [203.2.228.102]) by mailman.zeta.org.au (8.9.3/8.8.7) with ESMTP id WAA07042; Sun, 13 Jan 2002 22:36:47 +1100 Date: Sun, 13 Jan 2002 22:37:35 +1100 (EST) From: Bruce Evans X-X-Sender: To: Michael Reifenberger Cc: FreeBSD-Current Subject: Re: panic during fdisk'ing a md(4) device In-Reply-To: <20020112130202.F451-100000@nihil> Message-ID: <20020113222214.X598-100000@gamplex.bde.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII 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 On Sat, 12 Jan 2002, Michael Reifenberger wrote: > Hi, > more input: > The panic occurs in dsname() while dereferencing devsw(dev)->d_name. > devsw(dev) gives NULL. This was fairly clear from the panic message (the low fault address is almost certainly for a null pointer + offset, and it's fairly clear how dsname() gets a null pointer). Sorry I didn't reply earlier and save you the work debugging this. > The call to dsname() occurs from dkmodminor() defined in disklabel.h > I've seen two calls to dsname, only the second one panics. > Any thoughts? dkmodminor() is supposed to modify a minor device that already has a devswitch. Since dsname() in it panics, the problem is earlier when the minor device is created without giving it a devswitch. Minor devices are supposed to be created in a hierarchial order so that this doesn't happen. E.g., ad0 in disk_create() (only ?) ad0s1 now in dsopen() ad0s2 ad0s2a now in dsopen() ... I suggest adding printfs to make_dev() and makedev() to track the order. The problem occurs when makedev() is called without a corresponding make_dev(). Bruce To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message