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()
            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


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message

Reply via email to