Hi, On 12/22/05, Satinder <jeet_sat12@xxxxxxxxxxx> wrote: > > > 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? yes it decrements reference counter. you dont have to do it manually. > > 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 -- Kernelnewbies: Help each other learn about the Linux kernel. Archive: http://mail.nl.linux.org/kernelnewbies/ FAQ: http://kernelnewbies.org/faq/