The way I understood it, I thought, is that the ability to unload a module is 
set in your Kernel
Configuration (when loadable modules is Enabled of course).

I was in the belief that __exit  (I'm not sure if that's what you mean with 
exit() function)
only was relevant when they're modules built _into_ the Kernel.

I quickly looked at lkmg and this is what it states :

The __exit macro causes the omission of the function when the module is built 
into the kernel, and like __exit, has no effect for loadable modules. 
Again, if you consider when the cleanup function runs, this makes complete 
sense; built−in drivers don't need a cleanup function, while loadable modules 
do.
...

It's not my place, as I'm still pretty wet behind the ears with Linux, but 
that's how thought I understood it ?

Best Regards,
Kris 

> -----Original Message-----
> From: [email protected] 
> [mailto:[email protected]] On Behalf
> Of Robert P. J. Day
> Sent: Sunday, 28 June 2009 3:59 AM
> To: Kernel Newbies
> Subject: unloading a module with no exit routine?
> 
> 
>   as i read it, if you build and load a module with no exit() routine,
> once that module's loaded, it is absolutely unloadable until you
> reboot the system, is that correct?  i just tested that and, via
> lsmod, i see:
> 
> $ lsmod
> ...
> hi                      1760  0 [permanent]
> 
>   that certainly suggests to *me* that it's there for good, no matter
> what i do.  is that correct?
> 
> rday
> --
> 
> ========================================================================
> Robert P. J. Day                               Waterloo, Ontario, CANADA
> 
>         Linux Consulting, Training and Annoying Kernel Pedantry.
> 
> Web page:                                          http://crashcourse.ca
> Linked In:                             http://www.linkedin.com/in/rpjday
> Twitter:                                       http://twitter.com/rpjday
> ========================================================================
> 
> --
> To unsubscribe from this list: send an email with
> "unsubscribe kernelnewbies" to [email protected]
> Please read the FAQ at http://kernelnewbies.org/FAQ


--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to [email protected]
Please read the FAQ at http://kernelnewbies.org/FAQ

Reply via email to