p
pranitha p belavadi
Apr 23, 2012

driver unloading problem in mac os x snow leopard and lion

Hi i want to unload a wifi driver which I am having.. It is not the driver which is for Airport.. My driver creates another interface en2.. That driver contains two classes Controller class and interface class. when I try to unload using sudo kextunload name_of_kext then it is giving as one instance of controller class and one instance of interface class are remaining , I cant unload the kext.. when I give sudo dmesg it will show terminate(kIOServiceSynchronous) timeout.. As terminate is failing free() is not getting called. The driver contains only one kext and both controller and interface classes inherits from IO80211Controller class and IO80211Interface class respectively.. Now how can I unload my driver..

 

and also after kextunload while doing gdb, when I gave showallworkloopthreads one passive event source of IOCommandGate is remaining.. when i typed

sudo kextutil -m name_of_kext.kext,

It is showing as

No kernel file specified ; using running kernel for linking name_of_kext.kext appears to be loadable (including linkage for on-disk libraries)

When I gave

sudo kextunload -v name_of_kext.kext/

The output is :

(kernel) Can't unload kext com.name.driver; classes have instances:

(kernel) Kext com.name.driver class nameController has 1 instance

(kernel) Kext com.name.driver class nameInterface has 1 instance

Failed to unload com.name.driver - (libkern/kext) kext is in use or retained (cannot unload)

Please could anybody help me in unloading my driver???

jimlynch
04/23/2012
You might want to check the Mac Developer site for resources that could help you with this.

Mac Developer Program
https://developer.apple.com/programs/mac/


jimlynch
04/23/2012
You might want to check the Mac Developer site for resources that could help you with this.

Mac Developer Program
https://developer.apple.com/programs/mac/


Answer this
ASK a question
250