Re: More about MOD_INC_USE_COUNT

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

 



On Sun, Dec 08, 2002 at 07:10:39PM -0600, Curran, Dominic wrote:

> You want to put it in your open handler.  This is the handler that gets
> called when a user mode app opens a handle (file descriptor) to your driver
> using fd=open("/dev/mydriver",...).

No you don't. You want to set the relevant .owner field in the ops
structure you pass to the register function to be "THIS_MODULE"

> I am interested to know why he said that, is the 2.5 kernel keeping track of
> this internally now John ?

See above.

Search the lkml archives for Rusty Russell's HOWTO on module reference
counting in the new world

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