Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 5 Jul 2001 08:49:38 +0200
From:      Joerg Wunsch <j@uriah.heep.sax.de>
To:        cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org
Subject:   Re: cvs commit: src/sys/isa fd.c
Message-ID:  <20010705084938.A27341@uriah.heep.sax.de>
In-Reply-To: <200107042210.f64MAa704405@freefall.freebsd.org>; from joerg@FreeBSD.org on Wed, Jul 04, 2001 at 03:10:36PM -0700
References:  <200107042210.f64MAa704405@freefall.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
As Joerg Wunsch wrote:

>   Still, kldunloading leaves remnants of the previously existing devices
>   intact.  Why doesn't it destroy all the devices?  As a consequence,
>   since dev->descr now points into no longer allocated memory, the
>   system panics deep inside printf(9) when running devinfo(1) after
>   kldunloading the module.  Ideas sought...

Interestingly enough, removing the PCMCIA floppy then fully destroyed
the device -- even if the driver has been kldunloaded already before.

I could understand that even in cases where the driver is no longer
there but the device hardware still is, the internal device should
stay (for whatever reason).  But then, we need to clean out all the
mess the driver might have caused in struct device (like setting a
device description to a string that does no longer exist).  Who's
responsible for this?  The driver that's going to be unloaded, or the
bus code?  Still, i don't see much point in leaving the device
instances to survive, since upon the next driver kldload, the old
struct devices will (IMHO) first delete the old device instances
anyway.  Still showing them in devinfo(1) while there's no driver
doesn't make much sense (and is inconsistent with the world's view
before the driver was first loaded, since by then it was completely
unknown that some device hardware would exist, thus devinfo didn't
show it either).

-- 
cheers, J"org               .-.-.   --... ...--   -.. .  DL8DTL

http://www.sax.de/~joerg/                        NIC: JW11-RIPE
Never trust an operating system you don't have sources for. ;-)

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe cvs-all" in the body of the message




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