Re: "kextunload: unload kext <HelloIOKit> failed"
Re: "kextunload: unload kext <HelloIOKit> failed"
- Subject: Re: "kextunload: unload kext <HelloIOKit> failed"
- From: Garth Cummings <email@hidden>
- Date: Mon, 6 Dec 2004 08:21:43 -0800
Hi Brian,
On Dec 3, 2004, at 5:21 PM, Brian Jorgage wrote:
<snippage...>
When I run kextunload it fails (see subject line).
The /var/log/system.log indicates:
"localhost kernel: Stopping
localhost kernel: Can't unload <driver> due to -
localhost kernel: <driver name>:<driver name> has 1 instance(s)"
This occurs after I have disconnected the device in question. Also
IORegistryExplorer still sees the device and my driver after it's been
disconnected.
I am guessing this is the problem since Explorer still has a lock on
the driver.
No. IORegistryExplorer does not retain any of the objects in the I/O
Registry, otherwise running it would change the behavior of a running
system.
So how to force IORegistryExplorer to refesh and release
it's lock ?
Or is the problem something else ?
Yes. Someone else still has a reference to your driver. Often this is
because the termination code isn't quite correct--it's easy to get
wrong. It's very hard to tell what exactly the problem is in your case.
Has this code ever worked for you? A common debugging strategy for
reference leaks is to get the code back to a state when it worked, such
as the plain vanilla HelloIOKit sample. Then, make one small change at
a time and retest until the leak reappears.
Any ideas please respond.
Brian Jorgage
--gc
__________________________________________________________________
Garth Cummings
Apple Developer Technical Support email@hidden
http://developer.apple.com/technicalsupport
Attachment:
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-kernel mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden