tech-kern archive

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

closing a socket in kernel mode



I'm using sockets in kernel level. I use the following functions. I'm having
trouble closing the socket. What happens is that the file is not freed up
and I eventually get error 24 (Too many open files). Any ideas?

sys___socket30()
soaccept()
so_send()
sys_shutdown() (this causes the FIN to be properly sent)

-- and finally to close the file I do this, but it ends up sleeping in
sys_close ---
-- if I print fp->f_usecount I see it is 0xf. It was suggested that I try
FILE_UNUSE, 
-- but using FILE_UNUSE(fp,curlwp) does not change that f_usecount nor does
it
-- keep sys_close from sleeping
SCARG(&CloseArgs, fd) = s;
sys_close(curlwp, &CloseArgs, retval);

Eddy



Home | Main Index | Thread Index | Old Index