Query about sock_release

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

 



 
 
Hi everybody,
 I am having a query regarding the socket api  uses in module writing.
 I am writing a module in which I am allocating the socket using the sock_alloc() in init_module() function,
and mapping the socket to file descriptor using   fget(sock_map_fd(<sock pointer>))
 In cleanup function I am using sock_release() for doing cleanup work on unloading the module.
Does sock_release decreament the reference counter also ? or I have to do this my self using fput or sockfd_put?
 Is this is sufficient way of undoing the things (sock_alloc, sock_map_fd, fget) that I am doing in init_module().
Or there is still much cleaner way of doing this.
 
TIA,
Satinder

Send instant messages to your online friends http://in.messenger.yahoo.com


[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