question on reference counting

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

 



Hello,
I have been trying to have a skb destructor. I suppose before the skb
destructor is called , a try_module_get is done. My skb destructor is
called fine, shudnt the reference be dropped as soon as the function
call is over? I do lsmod and find that my module has a reference count
of 1.  I cant seem to understand how reference counting works.
Shouldnt it be done for every function ptr call? It seems to go more
like this... a increment for every socket which creates a skbuff and
sets its destructor. Im confused!Any pointers would be greatly
appreciated.

Thanks,
Sudharsan

--
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