Re: MOD_INC_USE_COUNT

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, Dec 08, 2002 at 12:51:43PM -0800, Jose Luis Alarcon wrote:

>   I has a big surprise when, adding at the beginning of init_module()
> the macro MOD_INC_USE_COUNT, for have a module use counter. My program
> get compile well and insmod work too.
> 
>   But the surprise was when i did rmmod, cos the output said:
> 
> FATAL: the module is in use

Why are you surprised ? You marked the module as used by something when
you load it, of course it can't be unloaded.

>   I did lsmod, and i got that my module was used by [unsafe].

You should not be using MOD_INC_USE_COUNT in 2.5 kernels. And you
definitely shouldn't be doing it in init_module(), that makes no sense.

What do you actually believe MOD_INC_USE_COUNT does ?

regards
john

-- 
"Saying that taste is just personal preference is a good way to prevent
disputes. The trouble is, it's not true."
	- Paul Graham
--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux