Re: "kextunload: unload kext <HelloIOKit> failed"
site_archiver@lists.apple.com Delivered-To: darwin-kernel@lists.apple.com Hi Brian, On Dec 3, 2004, at 5:21 PM, Brian Jorgage wrote: 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. So how to force IORegistryExplorer to refesh and release it's lock ? Any ideas please respond. Brian Jorgage --gc __________________________________________________________________ Garth Cummings Apple Developer Technical Support gcummings@apple.com _______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-kernel mailing list (Darwin-kernel@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-kernel/site_archiver%40lists.a... This email sent to site_archiver@lists.apple.com <snippage...> 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. 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. http://developer.apple.com/technicalsupport smime.p7s
participants (1)
-
Garth Cummings